1381 Commits

Author SHA1 Message Date
drh
309b338673 Added TRIM, LTRIM, and RTRIM functions. (CVS 3698)
FossilOrigin-Name: 6fe13eeade4fc7099fbda1e6520640927c08debc
2007-03-17 17:52:42 +00:00
drh
26b6d90d74 First cut at an implementation of the REPLACE() function. We might yet
make this a compile-time option or move it into a separate source file. (CVS 3697)

FossilOrigin-Name: c2fe746ea782f84e850aaf3af7f5536b027a19a1
2007-03-17 13:27:54 +00:00
danielk1977
06f52cb936 Add crash2.test, for robustness testing with variable disk block size. (CVS 3696)
FossilOrigin-Name: b0f8203dbbf1036418a2dcc480f352f761826194
2007-03-17 10:28:04 +00:00
danielk1977
59a33f98d6 Modifications to crash-test infrastructure. (CVS 3695)
FossilOrigin-Name: c4be8d9949fc7b5e1bed757423c5195f38069048
2007-03-17 10:26:59 +00:00
danielk1977
933bbd6c8d Combine the two very similar definitions of (crashsql) in the test scripts. (CVS 3694)
FossilOrigin-Name: eaf434d5887bf75330e1cea12be810dfe667b62a
2007-03-17 07:22:42 +00:00
drh
a7aea3dd52 Fix the pager so that it handles persistent I/O errors correctly.
Update the testing infrastructure so that it tests for persistent
I/O errors instead of just transient errors. (CVS 3690)

FossilOrigin-Name: ea8507a796c65041f7e720edea89f919fca1a028
2007-03-15 12:51:16 +00:00
drh
d5eb79eb40 Infrastructure to make simulated I/O errors persistent instead of
transient. (CVS 3689)

FossilOrigin-Name: 1a53f531ecd51938fab37a59b7088d89d8f8569d
2007-03-15 12:17:42 +00:00
danielk1977
d45a0315cb Do not crash when a corrupt database contains two indices with the same name. (CVS 3684)
FossilOrigin-Name: 48b2a40008a09881ed9da3548095495a3d4a6647
2007-03-13 16:32:25 +00:00
danielk1977
8efe541f24 Handle the case where the estimated cost of a virtual table scan is larger than SQLITE_BIG_DBL. Ticket #2253. (CVS 3670)
FossilOrigin-Name: 52885ed8b76a06588acf202a38b4feabfca1cfd1
2007-03-02 08:12:22 +00:00
danielk1977
a41c7497e8 Disable the "SELECT max(rowid) ..." optimization for virtual tables. Ticket #2250. (CVS 3669)
FossilOrigin-Name: ddb4d0af5770c7030fe6e92119972c9508724b9a
2007-03-02 07:27:00 +00:00
drh
fb658dedce Additional test cases added. Improvements to the INSERT transfer
optimization. (CVS 3662)

FossilOrigin-Name: 2bf5475bde763f73f7f4dd9cac7d13a631a7d2aa
2007-02-24 15:18:49 +00:00
drh
dd73521bc2 Additional tests and some improvements to the INSERT transfer
optimization.  More testing is needed. (CVS 3661)

FossilOrigin-Name: 830985814345f71ba2def3c206e36aabe9e1ee7c
2007-02-24 13:53:05 +00:00
drh
8103b7d2b7 Make sure the INSERT xfer optimization does not trigger if the CHECK
constraints on the two tables are not identical.  Ticket #2252. (CVS 3660)

FossilOrigin-Name: 6fc18275230563437f2985eac3795e4dfe8eb9de
2007-02-24 13:23:51 +00:00
drh
945498f3f2 Make sure that integer values are converted to real when pulled from
a REAL table column by GROUP BY.  Ticket #2251.  Also make sure default
values are correctly expanded.  There may be other places in the code
where this issue comes up - we need to look further. (CVS 3659)

FossilOrigin-Name: e11bbf174c5a2fa75e3d1dd450c8b2a18f40e4da
2007-02-24 11:52:52 +00:00
drh
3e35580779 Disable the OR optimization if it would conflict with column
affinity coercions.  Ticket #2249.  Additional cleanup and testing
of the OR optimization. (CVS 3658)

FossilOrigin-Name: 908daaa9ab86e0bd1da6d0807d6aaba240c3cee0
2007-02-23 23:13:33 +00:00
drh
de087bd5ed Clarify the documentation on how comparisons occur in an IN operator.
Fix the comparison operators when both sides of an IN operator are
expressions (ticket #2248).
Changes to main.mk for adding FTS2 into the standard build also
got mixed in with this check-in by mistake. (CVS 3656)

FossilOrigin-Name: da81725ca1cd894b3f2d734767e10cc0dc329566
2007-02-23 03:00:44 +00:00
shess
450d0aa933 Fix typos in test naming (was using 'e' instead of 'f'). (CVS 3655)
FossilOrigin-Name: 16cb00adeb3b68220ba2567b86b230bbbf2a0330
2007-02-23 00:14:05 +00:00
danielk1977
b77ff0139e Fix for an UPDATE on a virtual table when the WHERE clause matches zero rows.
Ticket #2244. (CVS 3652)

FossilOrigin-Name: 43bf797842f00a104f5c5619ad3215edddfc641b
2007-02-21 16:52:12 +00:00
drh
920769d3a6 In the corrupt2.test script,
change uses of (open ... a) to (open ... RDWR) to work around
inconsistencies in behavior across various platforms. (CVS 3645)

FossilOrigin-Name: 50e86b0368ae0268e7f07e44a746e13ad86a3b8b
2007-02-14 12:32:13 +00:00
danielk1977
0817d0dfc2 Use OP_VColumn instead of OP_Column when querying virtual tables for values to save in aggregate context records. #2230. (CVS 3644)
FossilOrigin-Name: cb78f7cb0f0bf0c799a929fd6ea30f25e2a7b5d0
2007-02-14 09:19:36 +00:00
shess
3438ea3b9e http://www.sqlite.org/cvstrac/tktview?tn=2219
When creating fts tables in an attached database, the backing tables
are created in database 'main'.  This change propagates the
appropriate database name to the routines which build sql statements.

Note that I propagate the database name and table name separately.  I
briefly considered just making the table name be "db.table", but it
didn't fit so well in the model used to store the table name and other
information, and having the db name passed separately seemed a bit
more transparent. (CVS 3631)

FossilOrigin-Name: 283385d20724f0144f38de89bd179715ee5e738b
2007-02-07 01:01:17 +00:00
drh
32ffdb7393 Additional tests to give full coverage testing to ticket #2211. (CVS 3630)
FossilOrigin-Name: ecb1f2fd7b96797459287eaab95693ae17ec2079
2007-02-06 23:41:34 +00:00
drh
7b4fc6a8cb When optimizing out an ORDER BY clause due to uniqueness constraints, make
sure unused terms to the right in the ORDER BY clause to not reference other
tables in a join.  Ticket #2211.  Additional test cases needed before
closing this ticket. (CVS 3629)

FossilOrigin-Name: 912faf18d86416b1a36660851f8a4554e6746875
2007-02-06 13:26:32 +00:00
danielk1977
d7263927f7 Set the MEM_Term flag when an internal string has a nul-terminator appended to it. Fix for #2213. (CVS 3627)
FossilOrigin-Name: fc969ad991e5114c3612f4796e342a6db2d79cd5
2007-02-05 14:21:47 +00:00
drh
8b4c40d8ac First cut at adding the COLLATE operator. Regression tests pass (or at least
the quick set does) and a few new tests have been added.  But many more
tests are needed.  Rules for combining collations need to be worked out. (CVS 3624)

FossilOrigin-Name: 85cca7cd252d46ba71d302a89bc67c56146ec552
2007-02-01 23:02:45 +00:00
drh
137c728f5a Replace the randomHex() function with separate functions
randomBlob() and hex(). (CVS 3620)

FossilOrigin-Name: f5ad74a9bc57e83c11beb3cf46bb6cd8c9de3f86
2007-01-29 17:58:28 +00:00
drh
63cf66f02e Add the randomhex() function as a built-in. (CVS 3619)
FossilOrigin-Name: a6001589ab1349f7a6b4af941e9e0fd73d13c1c0
2007-01-29 15:50:05 +00:00
drh
e3d559ad37 Adjustments to the pragma test for OS-X. (CVS 3615)
FossilOrigin-Name: 4d0d2063df2191155b290dc426b502bc7e1959c7
2007-01-27 14:26:07 +00:00
drh
05a6f4ac56 More adjustments to the pragma test for windows. (CVS 3614)
FossilOrigin-Name: 79a65436d1cd10ed6318edfaa7d76e2b99c7c879
2007-01-27 14:11:41 +00:00
drh
90ddb12399 Adjustment to tests for PRAGMA integrity_check so that they run under windows. (CVS 3613)
FossilOrigin-Name: a79914ccbc9e33a1dbc9be3de805f99ab3b61c78
2007-01-27 14:04:13 +00:00
drh
1dcdbc0639 Limit the number of errors returned by PRAGMA integrity_check to 100 by
default.  Specify an alternative limit using an argument to the pragma.
Ticket #2176. (CVS 3609)

FossilOrigin-Name: d564a039f27be2bb2c3973e79dc99b25869139da
2007-01-27 02:24:54 +00:00
drh
0ee5a1e763 Fix a (harmless) assertion fault on nested views where the inner views
are compound selects.  Ticket #2192. (CVS 3605)

FossilOrigin-Name: 942e7193bbf1ffe9a703891d175e016631e2ad5c
2007-01-26 19:04:00 +00:00
drh
f2d315d0c2 Fix an additional problem with the IS NULL optimization on LEFT JOINs.
Ticket #2189.  See also ticket #2177. (CVS 3602)

FossilOrigin-Name: 358dd82d3a921228155e2cf9e22aedd2b651ca9c
2007-01-25 16:56:06 +00:00
drh
4e653855ab Do not run the fts2i.test unless the FTS2 module is available. (CVS 3601)
FossilOrigin-Name: 310f68585188ae49b603af9bdef4ee7738ae37c0
2007-01-24 03:46:35 +00:00
drh
e0201fc0e2 Do not run test fts1i.test if FTS1 is not installed. (CVS 3600)
FossilOrigin-Name: 810c0176f8413995a78963c453e4377f11b293b5
2007-01-24 03:43:20 +00:00
drh
1941a3e8ac Fix a pragma test so that it works in directories that have spaces in
their names. (CVS 3597)

FossilOrigin-Name: 071c957a5dcd236139113d7c0dc1d58b54180eb7
2007-01-22 13:02:24 +00:00
shess
3ad202dd17 http://www.sqlite.org/cvstrac/tktview?tn=2166,35
Calling UPDATE against an fts table in a UTF-16 database inserts
corrupted data into the database.  The UTF-8 data is being inserted
directly.  This appears to happen because sqlite3_ value_text()
destructively coerces a value to UTF-8, and it's never converted back
when updating the table. This works around the problem by rearranging
things so that the update happens before the coercion. (CVS 3596)

FossilOrigin-Name: 4f2ab4b6320ffc621900049b41f50bc30d76d7f5
2007-01-19 22:59:56 +00:00
drh
c49de5d98c Make sure the IS NULL optimization introduced by check-in (3494) correctly
handles a LEFT JOIN where the a term from the right table of the join uses
an IS NULL constraint.  Ticket #2177.  This check-in also adds the new test
cases that were suppose to have been added with (3494) but which were
mistakenly omitted. (CVS 3595)

FossilOrigin-Name: 335863e4d16113fb9ecebce35d2db043771d98b1
2007-01-19 01:06:01 +00:00
drh
f6d8ab87c6 Fix a bug in sqlite3_prepare_v2() introduced by checkin (3578) and reported
on the mailing list. (CVS 3592)

FossilOrigin-Name: 87248470362f444f2339fee18d3624e8544f5256
2007-01-12 23:43:42 +00:00
drh
297a66c257 Documentation and tests to show that the cause of a parsing error is
available on sqlite3_errmsg after sqlite3_step return SQLITE_SCHEMA. (CVS 3581)

FossilOrigin-Name: 31a661d424d0fe03eaf78f98031e360102dafeff
2007-01-09 15:06:41 +00:00
drh
d47bcb9c73 Updates tests and documentation to justify the behavior observed in
ticket #2158.  No changes to code. (CVS 3580)

FossilOrigin-Name: e1f7cf065d2c4ca53e233a4506759a1899ad0560
2007-01-09 15:02:03 +00:00
drh
3c23a88562 When an automatic re-prepare occurs, take care not to reset the internal
schema symbol table.  Ticket #2156.  This change also includes some debugging
enhancements. (CVS 3578)

FossilOrigin-Name: 43fe7fc1c38f8d9b3c1346cb1d890c2e25cefe15
2007-01-09 14:01:13 +00:00
drh
f1d89f0dd9 Additional tests of sqlite3_prepare_v2. (CVS 3577)
FossilOrigin-Name: b0650aa6cfcb4c59fd8556b8f5523573538bd7e5
2007-01-08 22:40:32 +00:00
drh
c515525765 Fix a critical bug in sqlite3_prepare_v2 that can lead to segfaults when
the schema changes and the statement is recompiled automatically.
Ticket #2154. (CVS 3576)

FossilOrigin-Name: 3401388dba6c150f788397a4dfbcdb01313247e2
2007-01-08 21:07:17 +00:00
drh
622fa9a80e Fix another round-off problem in strftime(). Ticket #2153. (CVS 3574)
FossilOrigin-Name: d49ddc5ff05dd65e73edfa76db7e1af36967d81a
2007-01-08 16:19:07 +00:00
drh
c2c9eef6b3 Fix a round-off error in the %W and %j conversions of the strftime() function.
Ticket #2150. (CVS 3570)

FossilOrigin-Name: 52067937803e6b36afc8f11c5d24059414208b77
2007-01-08 13:07:30 +00:00
drh
ba92a2ebad Get threadtest2.c working again after being long neglected. (CVS 3562)
FossilOrigin-Name: 06216d0d3be38bfabda9f5f450a5eaccd20b52b9
2007-01-05 01:58:26 +00:00
drh
92895268a4 Fix a test case that changed due to (3560). Ticket #2143 (CVS 3561)
FossilOrigin-Name: c28664d314b8caa2844072ee9e5a50901996dc1e
2007-01-05 00:14:27 +00:00
drh
25403650c3 Fix the user_version and schema_version pragmas so that they set a result
column name.  Ticket #2143. (CVS 3560)

FossilOrigin-Name: f81c4227c26a4d43993904ab05c1eb9f988e3b66
2007-01-04 22:13:41 +00:00
drh
e61c769620 Fix the trigger4 test so that it runs on windows. (CVS 3559)
FossilOrigin-Name: 5e4e65ea15c51e75e9f003fbfde3fe87e22b889b
2007-01-04 22:13:02 +00:00