Commit Graph

2421 Commits

Author SHA1 Message Date
drh 9373b01882 Restrict the RANDOM() function to have zero arguments. Ticket #3627. (CVS 6229)
FossilOrigin-Name: b8b546b6ed799dc1621ef7b06273249af1042fb2
2009-02-02 01:50:39 +00:00
drh 8198d25442 Fix SUBSTR() so that it returns NULL if any argument is NULL.
Ticket #3626. (CVS 6228)

FossilOrigin-Name: 779fce82b7a89b972da488ce8bd35e23ca120c04
2009-02-01 19:42:37 +00:00
drh 4e79c59454 Fix the SUBSTR() function so that when the 3rd argument is negative,
it counts backwards from the selected start point.  Ticket #3625. (CVS 6227)

FossilOrigin-Name: 2217339badf1e84edbed1309c39b9f8dfd7646ff
2009-02-01 19:23:32 +00:00
drh a605fe8d8b Change the replace() function to return a copy of its first argument when
the 2nd argument is an empty string.  Ticket #3624. (CVS 6226)

FossilOrigin-Name: ffebf10f6fb2c7f3083992e2c712682b4cdcc6f0
2009-02-01 18:08:40 +00:00
drh c5cad1e350 Add a new test command, sqlite3_mprintf_long, for testing the behavior
of "long integer" printf formatting.  Ticket #3621. (CVS 6224)

FossilOrigin-Name: 3ba1a17b1306bc61b9861ec8d3b239e16a3081ba
2009-02-01 00:21:09 +00:00
drh dfbc3a8a3b Better error message when coalesce() has too few arguments. Ticket #3623. (CVS 6222)
FossilOrigin-Name: 9cd43c82a3c123829806aa7bf14efdd29f4424d8
2009-01-31 22:28:48 +00:00
danielk1977 64beba4338 Avoid a segfault when running vacuum on an in-memory database. Ticket #3620. (CVS 6221)
FossilOrigin-Name: 407830c6839a81fa0a1010940740df3011713a88
2009-01-31 14:54:06 +00:00
drh c531a22377 Fix a round-off error when moving dates by negative modifier amounts.
Ticket #3618.  Enhance the "NNN years" modifier to accept fractional
years. (CVS 6220)

FossilOrigin-Name: 86be908c5e77ba2b9ac98e394fa987b443d790f8
2009-01-30 17:27:44 +00:00
shane 6a91ca06b8 In test case incrvacuum-15.1 close both db handles (db and db2) before attempting to delete test.db. Ticket #3614. (CVS 6216)
FossilOrigin-Name: e764a7c5d369e2ff736d662b1209b3d54d778caf
2009-01-30 05:47:15 +00:00
drh db15bcd550 Add test cases to make sure that keywords that we say can be used as
identifiers really can be used as identifiers.  These tests were
inspired by ticket #3612, but they do not directly address ticket #3612. (CVS 6214)

FossilOrigin-Name: 6041ca87a16858f047727bc01f10b0bbc83609ed
2009-01-29 19:27:46 +00:00
danielk1977 25f42fe7a1 Remove incorrect ALWAYS macro associated with empty IN() sets. Ticket #3602. (CVS 6202)
FossilOrigin-Name: f3c09a0cb8bfc1a112c31b556d8921d5c75c5eef
2009-01-24 09:56:15 +00:00
drh 663d56d46f Fix the VACUUM command so that it does not commit a transaction when it is
mistakenly run within a transaction - it should leave the transaction open. (CVS 6200)

FossilOrigin-Name: 75cc709be46ae2096d2ba3e7ac58de8140f8130c
2009-01-22 23:04:45 +00:00
drh b8613ab127 Make sure mutexes are fully enabled for thread001.test. Take steps to
ensure that the thread tests run during regression testing. (CVS 6193)

FossilOrigin-Name: 6242f113eb40d472b78685c296fecf9f749a11cd
2009-01-19 17:40:12 +00:00
danielk1977 3cfe07037f Fix a bug that was preventing SQLite from releasing locks properly under obscure circumstances. (CVS 6192)
FossilOrigin-Name: 502c66df8b5fc5ec8e3d94202030571a4920fb9c
2009-01-17 16:59:40 +00:00
danielk1977 db3403973c Fix a change-counter bug similar to #3584. This one is much more obscure though, requiring a transient IO or malloc error to occur while running in exclusive mode. (CVS 6189)
FossilOrigin-Name: 9f07d2d9226b73c4dc311fd142e0aaba4ffcb078
2009-01-16 16:40:14 +00:00
danielk1977 78c2e6d837 Allow recently added keywords 'savepoint' and 'release' to be used as database object names. Just as they could be prior to 3.6.8. Ticket #3590. (CVS 6186)
FossilOrigin-Name: 54ab8326a1ea574b183f84c8465315e989a23ca4
2009-01-16 11:04:58 +00:00
drh ef731a7b84 Disable test case select2-2.0.3. This was a timing test that sometimes
fails due to CPU contention with other processes on the same host. (CVS 6183)

FossilOrigin-Name: ffdf91fec93aed35cf3dde1edbe9d7f8a5d23ae8
2009-01-15 15:23:59 +00:00
danielk1977 104f1fef2d Fix a problem with committing a transaction while there are other active statements. Sometimes, the database change counter was not being updated. (CVS 6176)
FossilOrigin-Name: b7d2a477aa2c3dbbb81d18fba1faa6835711b5c3
2009-01-14 17:45:57 +00:00
drh 94eb90c78b Here is the test case to prove that ticket #3581 is fixed. (CVS 6174)
FossilOrigin-Name: f5f5ef646bef6de6a744b565e089219d4e47397d
2009-01-14 01:10:40 +00:00
drh a7e770612b Make sure the OR-clause optimizer takes the cost of sorting into account.
Reset the rowid cache on the OP_Rewind and OP_Last opcodes.  Bump the
version number so that we can do an emergency release.  Ticket #3581. (CVS 6173)

FossilOrigin-Name: d28b58209bf5eb575d0cad8dc71ac043395c6471
2009-01-14 00:55:09 +00:00
danielk1977 838cce4382 Only run tests that depend on SQLITE_PREFER_PROXY_LOCKING builds when said symbol is set. (CVS 6169)
FossilOrigin-Name: 5d88f8be7342acd2a7ed6f269bec615cd03e59e2
2009-01-12 14:01:45 +00:00
danielk1977 c499bf1dc0 Fix jrnlmode.test so that it does not run tests involving in-memory journals during the "journaltest" permutation. (CVS 6166)
FossilOrigin-Name: b47ddefc772ee59aa1509ab8d8f229a3d7c4ddaf
2009-01-11 05:54:40 +00:00
drh 487b51e65c The crash8.test depends on auto_vacuum being off. Make sure that is the
case. (CVS 6165)

FossilOrigin-Name: 3538d2a981c5abfe2f88aec75175ae33475e6bcb
2009-01-11 00:44:47 +00:00
drh 8a5268739e In io.test, reset the connection after manually deleting the journal file,
so that the connection does not continue to use the old deleted journal file. (CVS 6164)

FossilOrigin-Name: 1e79f4f9e59469fb9e3e0007163de3e604dcf00f
2009-01-11 00:42:02 +00:00
drh f57cf606bc Adjust savepoint.test so that it can deal with SQLITE_TEMP_STORE=3. (CVS 6163)
FossilOrigin-Name: 3cb910f0ce116af3f291cb913b32abc89493bcc5
2009-01-11 00:18:38 +00:00
danielk1977 9393497826 Do not run crash8.test as part of the "journaltest" permutation. crash8.test uses "PRAGMA synchronous=off", which is incompatible with journaltest. (CVS 6162)
FossilOrigin-Name: 5f184da6758327e0d5fefe61ac3be06a79cc8269
2009-01-10 18:51:40 +00:00
danielk1977 7cbd589da0 Improve coverage of pager.c. (CVS 6158)
FossilOrigin-Name: 855c4093cf331496d9ef508011ad814e91e3882f
2009-01-10 16:15:09 +00:00
danielk1977 c87239fb32 Fix a bug in the previous commit - use SQL comments instead of Tcl comments in SQL blocks. (CVS 6155)
FossilOrigin-Name: 3d7a8de248ad5fba0e9c88f439cd2d988dcbab8c
2009-01-10 11:13:39 +00:00
danielk1977 9585528844 Add a malloc failure test case that covers a few previously untested lines in pager.c (CVS 6154)
FossilOrigin-Name: 000aedb0471b5f5a69e7b61f5e1d4b2644994f32
2009-01-10 11:10:18 +00:00
drh d2cb50b74c Coverage improvements in pragma.c. Change the __DARWIN__ macro to __APPLE__,
which is available by default on Leopard. (CVS 6153)

FossilOrigin-Name: 64c56226b91e57883c8059f65330318e53376b8a
2009-01-09 21:41:17 +00:00
danielk1977 0371f1b243 Increase pager.c coverage a bit. Fix an assert failure that can occur following a "PRAGMA omit_readlock" command on a read-only database. (CVS 6152)
FossilOrigin-Name: 0f3f9011fa143f7b63c9bf79d3e411327d5c6f9d
2009-01-09 17:11:04 +00:00
drh 5807c4ccc5 Fix two problems in test instrumentation that show up on some fulltests. (CVS 6151)
FossilOrigin-Name: c917961743e9ab60a096801c8910c6cd8367ee2f
2009-01-09 14:29:35 +00:00
danielk1977 03ba3fa02c Add a couple of coverage tests. (CVS 6149)
FossilOrigin-Name: 6a64109d1f9b63ac8b29ea2c77da02506387b4a1
2009-01-09 10:49:14 +00:00
drh 1c767f0df3 More coverage improvements. (CVS 6148)
FossilOrigin-Name: 6e171c0a64850013b26a223189d5bebcc0a01a8b
2009-01-09 02:49:31 +00:00
drh e2f02bacc1 Increased test coverage. (CVS 6147)
FossilOrigin-Name: 45bb5703d7ef5e835b43a6fa7ee2a2d96db76939
2009-01-09 01:12:27 +00:00
drh 103bd88cf7 Increased test coverage in where.c. (CVS 6146)
FossilOrigin-Name: 1e5725c5179660277c2e8c321877d7ee3ca21808
2009-01-08 21:00:02 +00:00
danielk1977 112f752be8 Fix a couple of potential corruption problems in pager.c. (CVS 6143)
FossilOrigin-Name: 5a39525ba3e65f1c6df3cf23fbfb57f6a0bf4b62
2009-01-08 17:50:45 +00:00
drh 4fd18c4b31 Add a test script for ticket #2565. Change the assert() in pager.c into
a testcase() macro. (CVS 6142)

FossilOrigin-Name: 1e53e382e5030de4d908098bf77af053dd81f0c5
2009-01-08 15:24:01 +00:00
drh 171256c45c Increase test coverage of where.c. Make sure OR-optimization works on
UPDATE and DELETE in addition to SELECT.  (Bug found by coverage tests.) (CVS 6139)

FossilOrigin-Name: 4b2c08e8984befb12fa2173ca89d9f54cf764d22
2009-01-08 03:11:19 +00:00
drh 7c2fbdeba2 Add new test cases to increase coverage of where.c. (CVS 6138)
FossilOrigin-Name: 2e1ab51f05447f9c1f291636b53b1ec584003841
2009-01-07 20:58:57 +00:00
drh 5bd98aef66 Fix a bug in the LIKE query optimization. (Found by coverage testing.) (CVS 6137)
FossilOrigin-Name: fe90e9116b6e1e25cf3119d2777a8e9c135153ce
2009-01-07 18:24:03 +00:00
danielk1977 be87104706 Add a "synchronous = off" variant to savepoint6.test. (CVS 6135)
FossilOrigin-Name: 0f57011e3b21fa5f6a819ce5a7fd8d44ea70679f
2009-01-07 17:06:52 +00:00
drh f3c57015d8 For archival purposes, add the TCL script that was used to generate many
of the test cases for where7.test. (CVS 6133)

FossilOrigin-Name: 0e01cdc8d283acd2757d69bf6d8e36bb1f47d460
2009-01-07 15:52:54 +00:00
drh ee03d629f5 Conjecture: a journal header with nRec==0 must be the last header in the
journal.  Add asserts to make this conjecture explicit. (CVS 6132)

FossilOrigin-Name: 15b5b5f90c2ffa79155cdc2dbc4fb5583cb72017
2009-01-07 15:33:45 +00:00
danielk1977 f90b7260b3 Fix for 'truncate file' operations on in-memory databases. (CVS 6131)
FossilOrigin-Name: 83d1eafbde556f56969c6f285b6767d2c658dbfc
2009-01-07 15:18:20 +00:00
danielk1977 1fab7b6664 Fix a problem with reverting a 'DROP TABLE' command executed inside of a savepoint on an auto-vacuum database. (CVS 6129)
FossilOrigin-Name: 3a4bb83235e9a79297e7d5d47ac7674c9df960bf
2009-01-07 10:35:18 +00:00
danielk1977 fc158bf920 Fix savepoint related bugs. A rollback caused by an IO error or "OR ROLLBACK" clause while one or more savepoints were open was leaving the sqlite3 structure in an invalid state. (CVS 6128)
FossilOrigin-Name: e5d42c69a3b325ca12f53184e33964230acbdd1f
2009-01-07 08:12:16 +00:00
drh 5093f6e5ee Now that we have permutations.test, it is really only necessary to run
all.test for a single cycle.  So make that the default. (CVS 6125)

FossilOrigin-Name: 3c2f292fb7c79ba9be32fe8f19e52b35b9cadf6a
2009-01-06 18:43:51 +00:00
drh 04df18dce8 Update permutations.test so that it does not show an error when running
the singlethread and multithread test cases on THREADSAFE=0 builds. (CVS 6119)

FossilOrigin-Name: 301b57b7bac949dd77037ad3175ba87c41c8c843
2009-01-06 14:50:11 +00:00
danielk1977 f2c31ad8af Add some savepoint related test cases and fix a few problems. (CVS 6116)
FossilOrigin-Name: 8c62ea4fded2251e9daf16f2a050f94359299d76
2009-01-06 13:40:08 +00:00