Commit Graph

7091 Commits

Author SHA1 Message Date
drh
d4e5cd05a4 Remove two more overzealous assert() statements. (CVS 6932)
FossilOrigin-Name: 788aa9dde9e76f67f22c07a904faf03e97e032c6
2009-07-25 00:13:58 +00:00
drh
16ff1700a9 Remove an overzealous assert() from pager.c. (CVS 6931)
FossilOrigin-Name: 4a924b475aa0f7f2f69caed0adc2e60d29c47f21
2009-07-25 00:10:45 +00:00
drh
d05c223c2e Fix an issue with the previous check-in, (6929). (CVS 6930)
FossilOrigin-Name: e5165c80abfdba0ad74e1042e4c94fe00d4b3308
2009-07-24 21:23:15 +00:00
drh
4775ecd06a Further simplifications to pager.c in support of structural coverage testing. (CVS 6929)
FossilOrigin-Name: 866216c0b6ba23b66483046fb402ddbe4f9a7b14
2009-07-24 19:01:19 +00:00
danielk1977
595a523a10 Allow virtual tables to be used in shared-cache mode. (CVS 6928)
FossilOrigin-Name: 5d9e767a05e381235e064061043e30cc03a11a07
2009-07-24 17:58:53 +00:00
drh
ad7516c45f Simplifications to pager.c in support of structural coverage testing. (CVS 6927)
FossilOrigin-Name: 7222ad2667b95d6021d9ae47f548b76b224f46aa
2009-07-24 16:32:00 +00:00
drh
b480dc2393 Simplifications and comment improvements in pager.c. (CVS 6926)
FossilOrigin-Name: 2d2f42ca0a24ed8b33f9ad560c76a6c1301c757b
2009-07-24 12:35:57 +00:00
drh
e39f2f9326 Simplifications and comment enhancements on btree.c. (CVS 6925)
FossilOrigin-Name: 5ba880dde8a219543ced6f792c7f9ecdcd8c1cbb
2009-07-23 01:43:59 +00:00
danielk1977
440637eb46 Modify mksqlite3c.tcl so that it inserts SQLITE_API macros into sqlite3.h. Ticket #3983. (CVS 6924)
FossilOrigin-Name: 803ec79f3b05fdd680f9ab762685bbd50a087b9b
2009-07-22 18:24:53 +00:00
drh
5d1a872ab6 Simplifications to btree.c in support of coverage testing. (CVS 6923)
FossilOrigin-Name: 375fd6f9c54fa5aa8cfae30845c7bfc0ec49e8fa
2009-07-22 18:07:40 +00:00
danielk1977
e878a2f41b Avoid leaving a suspect page in the page-cache if an error occurs during sqlite3PagerAcquire(). (CVS 6922)
FossilOrigin-Name: 2594f01c73301f9432be9d007a079a19a3d383f9
2009-07-22 16:41:15 +00:00
danielk1977
146ba99061 Fix a double-free that can occur after database corruption is detected. (CVS 6921)
FossilOrigin-Name: 5260e8b1048af2e00d49706466d9aded90c24ed2
2009-07-22 14:08:13 +00:00
drh
fe6212d549 Add a NEVER() macro around a pager.c conditional that must always be false
in the current implementation. (CVS 6920)

FossilOrigin-Name: 1e510d7fc5cc47fe2714dbb1ed3ea7e90acbff7b
2009-07-22 13:19:20 +00:00
danielk1977
257d9dc748 Changes to test code (only) to allow veryquick.test to run with OMIT_UTF16 builsd. Ticket #3985. (CVS 6919)
FossilOrigin-Name: 7f3fc7f20f6dc205eedbe445e35f5071f1c01185
2009-07-22 07:27:56 +00:00
drh
6e2ef43197 Remove an ALWAYS() from a condition that can in fact be false under very
obscure circumstances. (CVS 6918)

FossilOrigin-Name: 38083228956ac05df45f44447ab39c64852239d2
2009-07-22 02:02:39 +00:00
drh
ea8ffdfec7 Further simplifications to btree.c, especially the sqlite3BtreeKey() and
sqlite3BtreeData() functions.  New assert() statements added to verify
that these routines are called correctly. (CVS 6917)

FossilOrigin-Name: 96cfd079528501f6f1e658ce8a5a4e3bdea729be
2009-07-22 00:35:23 +00:00
danielk1977
89bc4bc645 Change getAndInitPage() (btree.c) to use only PagerAcquire(), not PagerLookup() and PagerAcquire(). (CVS 6916)
FossilOrigin-Name: 0b41dfc066b60ccabbf1a9ab4db41ebcb73a2799
2009-07-21 19:25:24 +00:00
drh
fe3313f9b1 Additional simplifications to btree.c in support of coverage testing. (CVS 6915)
FossilOrigin-Name: 716fccea58c4c217e68e04e0776e44ae39c11950
2009-07-21 19:02:20 +00:00
drh
fd5f02f0c6 Remove an assert() in btree.c which is no longer true due to changes in
the error reporting behavior of ptrmapPut(). (CVS 6914)

FossilOrigin-Name: 110998f18a7ad1ddaffab048cabef675d882cbb8
2009-07-21 15:33:14 +00:00
drh
c314dc7996 Changes to btree.c in support of coverage testing. (CVS 6913)
FossilOrigin-Name: 4cf23e9e860bd6245344884ec84f487fdf36f86f
2009-07-21 11:52:34 +00:00
drh
cd09c53d7f Reverse the order of two conditionals in a test in order to achieve coverage
of them both.  Also: clarifications to comments in btree.c. (CVS 6912)

FossilOrigin-Name: a159e9d24708dfe6c5a98d220e39f3b1b2a3d281
2009-07-20 19:30:00 +00:00
drh
98add2ed74 Modify various routines inside btree.c to take a pointer to the return-code
as a parameter and to no-op if the return-code storage location already
contains a non-zero code. (CVS 6911)

FossilOrigin-Name: 7dcf2a78727ce448d9d26bd6e2e23b553456ec54
2009-07-20 17:11:49 +00:00
drh
5dea3158fc Use an ALWAYS() on a conditional in btmutex.c that is always true. (CVS 6910)
FossilOrigin-Name: 609022caff12c010575e704be550da6f52226d33
2009-07-20 12:33:32 +00:00
drh
8de5a17e47 Corrections to the comment that is inserted at the top of the amalgamation.
Ticket #3981. (CVS 6909)

FossilOrigin-Name: 7572991bc2232f57d04c972d516a3e8f85f34f14
2009-07-20 12:25:44 +00:00
drh
dfc926410e Always provide a name for the TEMP database even if SQLite is compiled using
SQLITE_OMIT_TEMPDB. (CVS 6908)

FossilOrigin-Name: 0ba17c04834c0a44c8690169c0096c1d9cf325e4
2009-07-20 11:32:03 +00:00
drh
6aac11dc66 Code tweaks in support of full-coverage testing. (CVS 6907)
FossilOrigin-Name: 22c6dbfdce965e32f3df9aec28e46e714620c362
2009-07-18 20:01:37 +00:00
danielk1977
f16c62464d Add some code to sqlite3VdbeMemSetZeroBlob() so that it works (less efficiently) even when OMIT_INCRBLOB is defined. Ticket #3977. (CVS 6906)
FossilOrigin-Name: f5f7259d811ce8c2bf0bc64128256c4cd95f676a
2009-07-18 14:36:23 +00:00
danielk1977
5368f29ac4 When the asynchronous IO backend opens a file with the EXCLUSIVE flag set, make sure only a single file-descriptor is opened (not one for reading and one for writing). This change fixes #3978. (CVS 6905)
FossilOrigin-Name: 630e669b97a81f9125d4bdc18517738b74eecdec
2009-07-18 11:52:04 +00:00
danielk1977
627a3d6ab4 Changes to test scripts so that (make test) works when OMIT_INCRBLOB is defined. (CVS 6904)
FossilOrigin-Name: 1dd834a3d61496dfa138c36676a5fa6afaa4c817
2009-07-18 08:30:44 +00:00
danielk1977
e494817534 Fix a subtle problem that can occur when a transaction is automatically rolled back, and afterwards a VM that had opened a statement transaction within the abandoned transaction is finalized. Fixes an assert() that was failing in rtree3.test. (CVS 6903)
FossilOrigin-Name: 910df46e0f570cbffa9ff9b50d75632c091838b6
2009-07-17 17:25:43 +00:00
danielk1977
33c54a989e Return a meaningful error message if a keyword is used as an rtree table column name. Ticket #3970. (CVS 6902)
FossilOrigin-Name: 046efe46b50fbe928f39a0cda1b1006d486ce9f5
2009-07-17 16:54:48 +00:00
shane
9a8cee7f73 Skip all tests in tableapi.test if SQLITE_OMIT_GET_TABLE defined. Ticket #3975. (CVS 6901)
FossilOrigin-Name: 0219a543367638013ccd06295eeb9efc822e2dd1
2009-07-17 14:37:24 +00:00
drh
f18a61dd59 Code simplifications in support of structural testing. (CVS 6900)
FossilOrigin-Name: fb1b955dda5105025ef199880afa871e44331d65
2009-07-17 11:44:07 +00:00
drh
e64ca7ba11 Code simplifications and comment improvements in support of structural
coverage testing. (CVS 6899)

FossilOrigin-Name: 945251798144110787b197f9eb552a2dd4a25cb4
2009-07-16 18:21:17 +00:00
drh
b5526ea67f Remove an unused variable from sqlite3ExprListDup(). Ticket #3973. (CVS 6898)
FossilOrigin-Name: 17c05aefd6c9e938a4cc5d3de348d8c8fdc9394d
2009-07-16 12:41:05 +00:00
drh
e184965d7e Fix a potential database corruption following DROP TABLE when the pending
byte page corresponds to a ptrmap page.  This situation cannot happen in
a real deployment - but it still needs to be fixed. (CVS 6897)

FossilOrigin-Name: 6242db39f7f4ead5017bf684139d1f8312799f81
2009-07-15 18:15:22 +00:00
drh
4c301aaca8 Simplifications to btree.c in support of structural testing. Renamed the
"skip" field of the BtCursor object to "skipNext" to make it easier to
search for places where it is used. (CVS 6896)

FossilOrigin-Name: d3897235d77e48ad09f7edb0a7641458afa0a282
2009-07-15 17:25:45 +00:00
drh
2fa34d35c4 Remove an assert() from vdbeaux.c that might not be true if the database
file is corrupt. (CVS 6895)

FossilOrigin-Name: a42dc51e3bd258d5a357e557251fb2642708ceac
2009-07-15 16:30:50 +00:00
drh
c046e3edeb Added the SQLITE_TESTCTRL_RESERVE option to sqlite3_test_control().
Simplifications to btree.c to facilitate structural coverage testing. (CVS 6894)

FossilOrigin-Name: cfbeda1b3126503e9631471ce4713e25b007859f
2009-07-15 11:26:44 +00:00
drh
c27ae614dd Add comments and assert() statements to show that the return value from
sqlite3BtreeKeySize() and sqlite3BtreeData() usually do not matter.
Ticket #3968.  Also remove a NEVER() macro that can sometimes be true -
discovered while testing the previous change. (CVS 6893)

FossilOrigin-Name: 0c710c1be537127511d95b5b261c7bf26e1bc952
2009-07-14 18:35:44 +00:00
drh
d7c7ecdb01 Simplifications to the PRAGMA integrity_check logic. Remove unreachable code. (CVS 6892)
FossilOrigin-Name: 17749fa5480069cc4909acd992ab26d10afb279d
2009-07-14 17:48:06 +00:00
drh
407414c25f Simplifications and tweaks to vdbeaux.c resulting from structural testing. (CVS 6891)
FossilOrigin-Name: fa49666fb913f0d82e84bdfa2af3a294be04e47c
2009-07-14 14:15:27 +00:00
drh
6be240e546 Make sure the IN operator works with zeroblobs. Ticket #3965.
Other simplifications associated with structural testing. (CVS 6890)

FossilOrigin-Name: 25dd342283046aaf66a679348ef1c7364c616402
2009-07-14 02:33:02 +00:00
drh
3c18eb6048 Remove the SQLITE_CommitBusy flag. This was an attempt to block recursion
on the sqlite3_commit_hook() interface.  But such recursion is explicitly
disallowed, so the flag is pointless. (CVS 6889)

FossilOrigin-Name: 1c2bfc43a4fd5b779a3b5b5b8ca5b41cb7250b5a
2009-07-13 15:52:38 +00:00
danielk1977
31d31b87e9 Change an unreachable condition in btree.c to a NEVER(). (CVS 6888)
FossilOrigin-Name: 9f800e11391a108d7aa57f5a96d9a58711129132
2009-07-13 13:18:07 +00:00
danielk1977
a299d61249 In sqlite3PagerWrite(), do not set the PGHDR_NEED_SYNC flag on a page if an IO error occured while attempting to journal it. (CVS 6887)
FossilOrigin-Name: b9be365d85fddedbfa93eebf3ee62a140cbaa426
2009-07-13 11:22:10 +00:00
danielk1977
8f880a8cfb Remove an assert ("assert( subpage>0 )") from btree.c that may not be true for a corrupt database. Also add comments and other assert() statements to btree.c function moveToRoot(). (CVS 6886)
FossilOrigin-Name: 3151dab9c78106217ec80ebadc666dfd11b42029
2009-07-13 09:41:45 +00:00
danielk1977
3fd7cf5aa1 Remove a case from BtreeMovetoUnpacked() that is unreachable as of (6881). (CVS 6885)
FossilOrigin-Name: 39ce2097da03176e256a2ff35bb857e578f3ca2d
2009-07-13 07:30:52 +00:00
drh
3bcdfd25bd Simplifications to btree.c to help facilitate coverage testing. (CVS 6884)
FossilOrigin-Name: dfb146ef003bae8ff216baf68cc43d7eb7855c68
2009-07-12 02:32:21 +00:00
drh
6a8b8d3cc8 When an OOM fault occurs while moving a page for autovacuum in an in-memory
database, be sure to undo the page move prior to returning the error, to
avoid corrupting the in-memory database file. (CVS 6883)

FossilOrigin-Name: d0964b93669123e228e7ce1890167447c56753b5
2009-07-12 02:31:36 +00:00
drh
fb1926837a Remove an unused parameter from the accessPayload() function in btree.c. (CVS 6882)
FossilOrigin-Name: 7deb6568d89335926b77336756837c6dc3985529
2009-07-11 18:26:28 +00:00
danielk1977
bd5969a268 Fix a case where deleting a row from a corrupt database could cause an assert to fail. (CVS 6881)
FossilOrigin-Name: 6994b41a94a60f6460cf9814767db321ab3851f7
2009-07-11 17:39:42 +00:00
drh
41d628c123 Bug fix in the computation of the number of pages to autovacuum when
nReserve is greater than zero. (CVS 6880)

FossilOrigin-Name: 618a83d65f973183d21245721dc656a35ff594a4
2009-07-11 17:04:08 +00:00
drh
a4ec1d443a Unwind some complex conditions in sqlite3BtreeDelete() into
separate "if" statements. (CVS 6879)

FossilOrigin-Name: d99bde9ca61eeccfe6363ff0882fd4bcdb9a34dc
2009-07-11 13:13:11 +00:00
danielk1977
d8a3f3dd0d Remove another unreachable branch from btree.c. (CVS 6878)
FossilOrigin-Name: b0853100a9f8e185e8d027502822337a79a2ba0c
2009-07-11 11:45:23 +00:00
danielk1977
93caf5ad93 Modify the integrity-check code so that each b-tree page inspected is reinitialized while doing so, even if an initialized copy exists in the cache. This prevents an assert from failing when running integrity_check on a corrupt database. (CVS 6877)
FossilOrigin-Name: 709576c670f802bf4b6e5c0e8db2bbde2cc16a90
2009-07-11 06:55:33 +00:00
danielk1977
171fff3c9a Remove unreachable condition from btree.c. (CVS 6876)
FossilOrigin-Name: 47b40fefa67f7c563ce2004509aaf8e203038be4
2009-07-11 05:06:51 +00:00
drh
5e483939bc Fix a pager reference count leak in btree that occurs on an OOM following
a database page size change. (CVS 6875)

FossilOrigin-Name: c6dfc8bd3911b4c93969bfc13d9931965feed674
2009-07-10 16:51:30 +00:00
danielk1977
e932ba260e Fix a double-free that can occur when using the fts3 legacy syntax '-' operator. Add tests for the same operator. Ticket #3960. (CVS 6874)
FossilOrigin-Name: c19d419e8cf94a26d9bb6ad478e84841168a882e
2009-07-10 09:24:43 +00:00
drh
8c2bbb620b Simplifications to the PRAGMA integrity_check logic in btree.c. (CVS 6873)
FossilOrigin-Name: 440c573c7e2a22f9a67a9571883e205fbadb7c11
2009-07-10 02:52:20 +00:00
drh
7157e1d2e5 Fix two faulty assert() statements btree. (It was possible for the assertions
to be false given a corrupt database file as input.) (CVS 6872)

FossilOrigin-Name: 9403f04dfdabdd2ba9adb1a91ca9b400cf4ca6b3
2009-07-09 13:25:32 +00:00
danielk1977
5cb0963fdc Remove an unused branch from btree.c. (CVS 6871)
FossilOrigin-Name: 45efb78a8a1e01a0154153b10469bb34d6d129eb
2009-07-09 11:36:01 +00:00
danielk1977
9d10486ae7 In btree.c, have setSharedCacheLock() assume that the b-tree is sharable instead of checking to see if it is. The caller has already performed this check. (CVS 6870)
FossilOrigin-Name: 3190eefd5f5285a5250d6f4729f109852fdb02ab
2009-07-09 08:27:14 +00:00
danielk1977
3054866c7c Restore (btree_set_cache_size) to test3.c. This is used on unix for the tcl "crash tests". Make some functions no longer used outside of btree.c static. (CVS 6869)
FossilOrigin-Name: 1d96ce8c76e007ca29e7971a6c72b6387fe0fb93
2009-07-09 05:07:37 +00:00
shane
cbcadd41f9 removed the test function sqlite3BtreeFlags() (test code only); (CVS 6868)
FossilOrigin-Name: 579ba6c83f52d26860e5152f06355aa4f49e568d
2009-07-09 03:20:46 +00:00
shane
20a35fd826 removed unused functions from test3.c (test code only); (CVS 6867)
FossilOrigin-Name: 0eb69e8dda13e2d52a06f66a71480f59fd766271
2009-07-09 02:48:23 +00:00
drh
df35a08cb7 Simplifications and additional testcase() macros for btree.c. (CVS 6866)
FossilOrigin-Name: 1b8c3a8246a5d8b8f5607014f68483735a403249
2009-07-09 02:24:35 +00:00
danielk1977
4e6604ee80 Fix a typo in (6861): "ifndef SQLITE_TEST" -> "ifdef SQLITE_TEST". (CVS 6865)
FossilOrigin-Name: 890dbab28c3a1af4a1e01221318c9200574139e7
2009-07-08 18:50:55 +00:00
danielk1977
4f02960899 Revert part of (6860) that was accidentally checked in. (CVS 6864)
FossilOrigin-Name: 11e295ccd28fe669ee74c846db507040895a5e5b
2009-07-08 18:45:37 +00:00
drh
f3aed5944c Add another boundary-condition testcase() macro to btree.c. Correct the
comment on modifyPagePointer(). (CVS 6863)

FossilOrigin-Name: fed66e8695ee552d5ca05ac91485cfc5940e7496
2009-07-08 18:12:49 +00:00
drh
b908d76fb8 Improvements to comments in btree.c:freeSpace(). Added a testcase() macro
to verify a boundary case is tested in sqlite3BtreeInitPage(). (CVS 6862)

FossilOrigin-Name: 5ac991b3cea214095b8369e85f3e0ad8e5059ad6
2009-07-08 16:54:40 +00:00
drh
35a25da1b3 Comment out sqlite3BtreeFlags() when not in debug mode. Tweaks to
database corruption detection logic in freeSpace(). (CVS 6861)

FossilOrigin-Name: 196cbf82290a308e78b13044d0fae993f2d5cb90
2009-07-08 15:14:50 +00:00
danielk1977
c9000e60c6 Fix error handling in sqlite3BtreePutData(). (CVS 6860)
FossilOrigin-Name: 86eba4f16fd9e97344ab6dfb9cb9a85cf14751dd
2009-07-08 13:55:28 +00:00
danielk1977
ecaecf929e Remove an ALWAYS clause that could be false if an IO error within a statement executed by a virtual table caused an emergency rollback. (CVS 6859)
FossilOrigin-Name: 0cc705c2c4aa06c33361b11c06423ff76d9eed7c
2009-07-08 08:05:35 +00:00
drh
0a45c270be Simplifications to sqlite3BtreeInsert() and allocateSpace(). Added many
testcase() macros to verify boundary conditions in btree.c. (CVS 6858)

FossilOrigin-Name: aab82a229a984bdd37bda2d140cf4279ab54a741
2009-07-08 01:49:11 +00:00
drh
1714662877 Improvements to corrupt database detection in defragmentPage(). (CVS 6857)
FossilOrigin-Name: 87bbc8d6b68c089c8211c35c11c2f6ac4e46271c
2009-07-07 17:38:38 +00:00
danielk1977
172114a02e Do not load the root-page of a b-tree table/index when opening a cursor. Instead, allow it to be loaded when the cursor is first used (in function moveToRoot()). Also move the root-page flags sanity checks that were a part of the OP_OpenRead/OpenWrite opcodes into the moveToRoot() function. (CVS 6856)
FossilOrigin-Name: 06dcfe72a6ff3f63639eeb00ec5b5022d10fc55b
2009-07-07 15:47:12 +00:00
danielk1977
75a4012765 If an error occurs in PagerBegin(), call pager_end_transaction() to reset the internal state of the pager object. (CVS 6855)
FossilOrigin-Name: ea7ed16628da29cf4a127a25cbac8ae553e2ac1f
2009-07-07 13:56:24 +00:00
drh
4925a55d14 Fix a reference count problem following database corruption detection in
the ptrmapPut() routine of btree.c. (CVS 6854)

FossilOrigin-Name: ec1e27e33b89e809a03e4140b351f6c8674c0233
2009-07-07 11:39:58 +00:00
drh
fa3be90471 Simplifications to btree.c and vdbeaux.c in support of structural coverage
testing. (CVS 6853)

FossilOrigin-Name: fc2a40a9db23285da16f40f5131613907fb80f02
2009-07-07 02:44:07 +00:00
drh
d5bc725f0b Fix the pager so that it remembers the name of the journal for an in-memory
database as an empty string.  This is important when committing a multi-database
transaction that includes one or more attached memory databases. (CVS 6852)

FossilOrigin-Name: 31a5e8192e164f01c5d7c2744b67cfb517251fad
2009-07-06 21:54:40 +00:00
drh
f25cd7186e Fix the backup logic so that it detects a failure to sqlite3BtreeUpdateMeta()
and reports that failure back up to the top level. (CVS 6851)

FossilOrigin-Name: 471b92f2514aedecb5773825a7ae472190375727
2009-07-06 19:03:12 +00:00
danielk1977
3509a65827 Make the sqlite3BtreeMoveto function static, since it is only used from within btree.c. Remove unused function lockBtreeWithRetry from btree.c. (CVS 6850)
FossilOrigin-Name: 30d5ec62ab6a85ee60ee4128e20959842f8c7ad1
2009-07-06 18:56:13 +00:00
drh
5f82e3cc3a Simplifications and comment cleanup in vdbeaux.c. (CVS 6849)
FossilOrigin-Name: 1636e7831a21d401a48aa74d884444a287f14f72
2009-07-06 00:44:08 +00:00
danielk1977
3e8add919a Remove unreachable code from function btreeCursor() in btree.c. (CVS 6848)
FossilOrigin-Name: c76a366ed4dc63604ff695b3ee9c183e430a367e
2009-07-04 17:16:00 +00:00
danielk1977
1bc9ee9835 Remove a redundant branch from btree.c. (CVS 6847)
FossilOrigin-Name: 133357d2f070ba303deddff59beead1ec8d10521
2009-07-04 15:41:02 +00:00
drh
e7f3f3eec1 Remove two unused fields from the Parse structure. The TCL interface now
removes leading whitespace from SQL statements before parsing them. (CVS 6846)

FossilOrigin-Name: 983cb6924b8a7d3057718b9228c0cb2fbe7f0dc4
2009-07-03 22:54:36 +00:00
drh
1adecdf814 Remove unused code (that was commented out) from prepare.c. Remove an
incorrect NEVER() macro.  Fix the comment on schemaIsValid() to correctly
describe its return behavior. (CVS 6845)

FossilOrigin-Name: 90deb65835febc908f21bca89ef497d1048afe0a
2009-07-03 19:19:50 +00:00
drh
6bef648d97 Cause sqlite3_exec() to return SQLITE_NOMEM if it cannot allocate memory to
hold the error message for some other error. (CVS 6844)

FossilOrigin-Name: e9849292ab741f4c86203b2629dbe116f9b527c8
2009-07-03 19:18:43 +00:00
drh
ee152b00a3 Remove an unused variable from the test code in test3.c. (CVS 6843)
FossilOrigin-Name: 9e35bec9ef924ec44e87294a549238e0104bb27b
2009-07-03 17:23:48 +00:00
drh
53bc21b911 Add a version of the Lemon parser template "lempar.c" to the src/ subfolder.
This new parser template contains a couple of NEVER() macros that disable
tests that are needed for general grammars but not for the specific grammar
used by SQLite.  SQLite builds with the modified lempar.c. (CVS 6842)

FossilOrigin-Name: d426cc64f6014e2c2b9bcde0f5440396aec2fa18
2009-07-03 17:09:28 +00:00
danielk1977
e0d9e6f623 Simplify the way the read-uncommitted flag is handled to facilitate test coverage. (CVS 6841)
FossilOrigin-Name: e2112d6160a82ccd4b6a1c798d2064d0f1b086eb
2009-07-03 16:25:06 +00:00
drh
b1819a0b95 Make explicit the restrictions on UPDATE, DELETE, and INSERT statement syntax
within triggers.  Ticket #3947. (CVS 6840)

FossilOrigin-Name: c8bf40df7be728b11bb633516d1988c6064a9d70
2009-07-03 15:37:27 +00:00
drh
06150f95e8 Test the result of pthread_create() and do not call pthread_join() if the
thread creation failed.  Ticket #3933. (CVS 6839)

FossilOrigin-Name: 304c5110ad958b2cc1ddff30e68c8791109128b5
2009-07-03 12:57:58 +00:00
danielk1977
34acdc9573 Fix to sqlite3AuthRead to accommodate "new" or "old" references that are used in a context where a column reference may also be used (i.e. "SELECT new.<col> FROM <tble>"). Ticket #3944. (CVS 6838)
FossilOrigin-Name: 45fd5419a7cde29eb6ab5d98141bd642af0d78fb
2009-07-02 18:40:34 +00:00
danielk1977
94b30733f7 When a b-tree transaction is committed when there are open cursors, downgrade shared-cache write-locks to read-locks instead of relinquishing all locks. Fix for #3942. (CVS 6837)
FossilOrigin-Name: 611e704fdf90a3d3932ca1cbab4be7e282bf1ddf
2009-07-02 17:21:57 +00:00
danielk1977
602b466e99 Cause opening a transaction on a sharable b-tree module automatically obtain a read-lock on page 1. This means there is no way for sqlite3BtreeGetMeta() to fail. (CVS 6836)
FossilOrigin-Name: e3c055f167f895ae45858de9d9d8a264df2f36b6
2009-07-02 07:47:33 +00:00
danielk1977
325ccfa90e Fix for compilation with OMIT_AUTOVACUUM defined. Ticket #3940. (CVS 6835)
FossilOrigin-Name: 8f0591ae98c2125a4922933496f4412aee8ab86e
2009-07-02 05:23:25 +00:00
danielk1977
8b32282795 Change to test code and scripts allowing memsys3 to be tested using a build that has both memsys3 and memsys5 enabled. (CVS 6834)
FossilOrigin-Name: a00aeec21cca7ccf19d4cdef618149aa2773c005
2009-07-01 18:09:01 +00:00
danielk1977
e25a50b6c3 Fix a 1-byte buffer overwrite that can occur when a virtual table overloads an SQL function. (CVS 6833)
FossilOrigin-Name: bfe336a8993e06e70d3c32a929202fb015dcbb89
2009-07-01 18:04:20 +00:00
danielk1977
bd1a0a4f61 Report an error if a USING or ON clause is specified following a from-list element that is not to the right of a join operator. Fix for #3846. (CVS 6832)
FossilOrigin-Name: 29b48972b65a17dab343b063a620cf8d456a923c
2009-07-01 16:12:07 +00:00
danielk1977
9b87d7b904 Do not ignore alias "a" in a query of the form "SELECT ... FROM (...) AS a" Fix for #3935. Also expand upon (6751) to fix some similar obscure memory leaks. (CVS 6831)
FossilOrigin-Name: 42f9d1e56483a59353bff57d75f09ed67e1d9c3c
2009-07-01 14:56:39 +00:00
danielk1977
96d48e963a Cause incremental-blob read/write operations lock shared-cache tables in the same way as normal SQL read/writes. Add complex assert statements to make sure tehe correct shared-cache locks are held when accessing the database. Eliminate some redundant checks from btree.c. (CVS 6830)
FossilOrigin-Name: f17ef37897da9bcaf20b5acdce6840522c0a0b16
2009-06-29 06:00:37 +00:00
drh
1b1166b7c7 Version 3.6.16 (CVS 6829)
FossilOrigin-Name: ff691a6b2a302fe7978459cb8df9d56184892ee0
2009-06-27 14:10:30 +00:00
drh
bdfb6b5ab2 Fix an instance where sqlite3JumpHere() might be called with a negative
address following an OOM fault. (CVS 6828)

FossilOrigin-Name: 49f22e55d69d0b5a34400b36332a2eb861362eb2
2009-06-27 11:17:35 +00:00
drh
b6063cf823 Fix a bug in sqlite3_realloc() - if called with a size of more than
2147483392 it returns 0 but it also releases the prior allocation. (CVS 6827)

FossilOrigin-Name: 653df0afcc58de82c8c1b5f6a7b2f4829ff69792
2009-06-27 00:48:33 +00:00
drh
e08ed7e71b Remove incorrect NEVER() macros from malloc.c. The allocations can be
exceeded using sqlite3_malloc() and sqlite3_realloc(). (CVS 6826)

FossilOrigin-Name: 0d345e5923ff92a87195f6c04a29a56bf67ee43c
2009-06-26 18:35:16 +00:00
shane
36840fdddb Removed a few compiler warnings under MSVC. (CVS 6825)
FossilOrigin-Name: f01a9fc375d77c67602a9f6be6a674beb516233f
2009-06-26 16:32:13 +00:00
drh
9ed7a9953e Remove the priorNewRowid field from the sqlite3 structure. Use the
last_insert_rowid as the initial value when searching for a new random
rowid in the OP_NewRowid opcode. (CVS 6824)

FossilOrigin-Name: 96729b2d499f029bfaec6648a592e8ec697d9521
2009-06-26 15:14:55 +00:00
shane
389ae2c52d Skip a couple tests requiring working 64bit int support on platforms without that support. Test code change only. (CVS 6823)
FossilOrigin-Name: d8c8145c9d28d014eb9218b3f1312b957ccc72b7
2009-06-26 14:17:47 +00:00
drh
c42ed16e5c When sqlite3VdbeAddOp() fails due to an OOM fault, return an address of 1
rather than zero so that there appears to always be a prior instruction.
This prevents a negative jump-to address computation in where.c following
an OOM fault. (CVS 6822)

FossilOrigin-Name: fe02339cb2f61c1e8a356e2d0ce9c3aef6e6cd8d
2009-06-26 14:04:51 +00:00
danielk1977
31559aee71 Fix a test script problem in exclusive.test. (CVS 6821)
FossilOrigin-Name: a52ef5a4216f26c617bd1471cd19f3da2a6d2c4c
2009-06-26 12:30:39 +00:00
drh
7b746030bc Fix the new pager.c changes so that they compile with IOTRACE defined.
Fix an out-of-order variable definition in vdbeaux.c. (CVS 6820)

FossilOrigin-Name: ac1450285025e33fad81e2fb14a06eb85e8ed87a
2009-06-26 12:15:22 +00:00
danielk1977
8ca8255325 Another change to test_journal.c to account for (6817). Again, only test code has changed. (CVS 6819)
FossilOrigin-Name: 58884b6c50f927c5606d857b2865d788a5147060
2009-06-26 10:39:36 +00:00
danielk1977
8f398adbb7 Update test_journal.c to account for (6817). Changes to test code only. (CVS 6818)
FossilOrigin-Name: 542ee8cced2a37095808d8baf5002dc66f4a64d6
2009-06-26 09:01:28 +00:00
danielk1977
6f4c73eedb Avoid writing the 8-byte journal-header magic until the journal-header is synced. In persistent journal-mode, this prevents any old content that follows an unsynced journal-header from being interpreted as part of the rollback journal. (CVS 6817)
FossilOrigin-Name: a5ecffcf025da2fcb241e83c7bebc1095a3b51d6
2009-06-26 07:12:06 +00:00
danielk1977
46aa38f2c0 Fix a problem with a return code being ignored in insertCell(). (CVS 6816)
FossilOrigin-Name: bb5f1c01435dcc1ea056f0d149f750fa7812f652
2009-06-25 16:11:05 +00:00
drh
9635cc7c0d Get the notify2.test running again by removing an ALWAYS() that was mistakenly
inserted and by taking care not to report corruption following an
SQLITE_LOCKED failure during schema parsing. (CVS 6815)

FossilOrigin-Name: 6e9140a729bd26dd102e603abf6ea16d67e8546e
2009-06-25 11:50:21 +00:00
danielk1977
c1761e887b Replace an "if" condition that is always true in btree.c with an assert(). (CVS 6814)
FossilOrigin-Name: daadbd9a8f0e35dd16c715cf2e9f99f52afa30dd
2009-06-25 09:40:03 +00:00
drh
4c8555fd47 Improved handling of oversize string and blob errors. Other simplifications
in support of full coverage testing. (CVS 6813)

FossilOrigin-Name: 8b34076668f0f712de0fbbe9bc2e68d42797e1b2
2009-06-25 01:47:11 +00:00
drh
46bbabd959 Remove an ALWAYS() macro from vdbe.c that sometimes fails on thread tests. (CVS 6812)
FossilOrigin-Name: 52eac078c7080519911599e19819cbec475de6d6
2009-06-24 13:16:03 +00:00
drh
c3927537d8 Disable the new malloc-37 test when locking_mode==exclusive. The test
basically works, but sometimes reports "database is locked" instead of
"out of memory" and that messes up the error reporting. (CVS 6811)

FossilOrigin-Name: 3b8f9dec24d06865455a75587bbfc199c19c6215
2009-06-24 13:13:45 +00:00
drh
bfff79f125 Remove a declaration of the sqlite3Assert() function that was deleted by the
previous check-in. (CVS 6810)

FossilOrigin-Name: ee20b6a23fa4a4ec4d3a2d0dcfcabff466f08246
2009-06-24 11:08:13 +00:00
drh
2de80f4c50 Remove the sqlite3Assert() function. The ALWAYS() and NEVER() macros call
assert() directly when compiled with SQLITE_DEBUG. (CVS 6809)

FossilOrigin-Name: d8fc373fef22311e1c6b5bce6d3e601217a69940
2009-06-24 10:26:32 +00:00
danielk1977
13bd99fa43 Simplify things by rolling the functionality of balance_shallower() into balance_nonroot(). (CVS 6808)
FossilOrigin-Name: 11750c6aee6aa05b2627ad9dfb2fbcdfe8944168
2009-06-24 05:40:34 +00:00
drh
0b9f50d8aa Enhance autoincrement so that it works with triggers that also do
autoincrement inserts, even multiple inserts into the same table.
Ticket #3928 (CVS 6807)

FossilOrigin-Name: 1330993de8eae7baeec24100216158063c9bdc19
2009-06-23 20:28:53 +00:00
danielk1977
1c3d2bf9cf Remove a condition from balance_nonroot() that is always true. (CVS 6806)
FossilOrigin-Name: c5dc80e6bdd18a5ada728c8d5c9403ac233f1c9a
2009-06-23 16:40:17 +00:00
danielk1977
cd581a7eff Call balance_shallower() from balance_nonroot() instead of from balance(). This simplifies coverage testing a bit. (CVS 6805)
FossilOrigin-Name: da9893e23caf89090c8b6563cb5f88d7dbf7c260
2009-06-23 15:43:39 +00:00
drh
5c91b64e0d Update the configure script for version 3.6.16 (CVS 6804)
FossilOrigin-Name: b614e554f7ebaef9cb1718b617e020e532568bbb
2009-06-23 14:39:52 +00:00
drh
d40afea8bc Update the version number in preparation for the next release. (CVS 6803)
FossilOrigin-Name: 207c4a02ba4dd950948367c91b4a73209d62da41
2009-06-23 14:18:15 +00:00
drh
35f6b936ce Simplifications to vdbe.c to promote better test coverage. (CVS 6802)
FossilOrigin-Name: 3ffc93d762b64fd84f47c4b6d68ab56b69ea98a9
2009-06-23 14:15:04 +00:00
danielk1977
1c84ac596d Add a test to verify that #3929 is fixed. (CVS 6801)
FossilOrigin-Name: 16c1ae9bde895d39c4eaababbd1dbf9e3b9cb653
2009-06-23 11:53:09 +00:00
danielk1977
54109bb206 Fix a failing assert in btree.c. The same bug was causing a spurious SQLITE_CORRUPT return when compiled without SQLITE_DEBUG. (CVS 6800)
FossilOrigin-Name: 47ec8749470af7cab9f3ef15effce1a7ba79a654
2009-06-23 11:22:29 +00:00
drh
9a65f2cd7d Simplifications to vdbe.c and it service routines in support of coverage
testing. (CVS 6799)

FossilOrigin-Name: 308f2e61520ac7440700d93ca5bab4a844f2dc17
2009-06-22 19:05:40 +00:00
danielk1977
b980d2219f Remove a condition that is always true from btree.c. (CVS 6798)
FossilOrigin-Name: 3ec8b37a89fdb2436d312439715414fae2cd20a8
2009-06-22 18:03:51 +00:00
drh
27731d7c73 Make sure sqlite3BtreeCreateTable() returns an error code if the largest
rootpage field is invalid in auto_vacuum mode.  Update file-format comments
to describe all of the "meta" values. (CVS 6797)

FossilOrigin-Name: bda38f5e86db45234c2dbb0f8d1a81f6ff6d04e4
2009-06-22 12:05:10 +00:00
drh
653b82a516 More simplifications to vdbe.c. Remove a NEVER() from vdbe.c that is possible
after all. (CVS 6796)

FossilOrigin-Name: c8f009bd24cb4e4b5ce9fbfd8ab09921f19d41af
2009-06-22 11:10:47 +00:00
danielk1977
3582c8f7ae If an OOM error occurs just after obtaining a shared lock on the database file, release the lock before returning. (CVS 6795)
FossilOrigin-Name: 971a9650f66f079630489c34e40003eee97d1683
2009-06-22 05:43:24 +00:00
drh
aa73609f92 Simplifications to vdbe.c in support of coverage testing. (CVS 6794)
FossilOrigin-Name: 16680f05bd169dfb1b4bf0eb082e69701f9b07ab
2009-06-22 00:55:30 +00:00
danielk1977
3a1bf71f95 When recovering from the error-state in pagerSharedLock(), do not search for a hot-journal in the file-system if the pager is configured to use an anonymous temp file as the journal. (CVS 6793)
FossilOrigin-Name: 4b46805cbc9fe71f1febe9ea5f0f5634b65128e3
2009-06-20 18:52:49 +00:00
danielk1977
641a0bd205 If after obtaining an exclusive lock to rollback a hot-journal file it is found that the journal file has been deleted, do not return an SQLITE_BUSY error. Just downgrade the lock and continue with the current operation. This eliminates a spurious SQLITE_BUSY error caused by a race condition. (CVS 6792)
FossilOrigin-Name: 9a0666003764774b0bf861687002f8db9fd314b1
2009-06-20 11:54:39 +00:00
drh
9afedcc0b8 Improved documentation on the VFS methods. Ticket #3925. (CVS 6791)
FossilOrigin-Name: f66fc7713ec5ff8cf92e875e904f079d724b0477
2009-06-19 22:50:31 +00:00
drh
9eb8cbe5c0 Do now allow a COMMIT to occur while even a single write operating is
in progress. (CVS 6790)

FossilOrigin-Name: 605520ec04061e389226fbec59f7aedf674b3c4e
2009-06-19 22:23:41 +00:00
drh
bf66446972 Fix the comment on the sqlite3PExpr() subroutine. Ticket #3924. (CVS 6789)
FossilOrigin-Name: 4bb96db6b4d2cfa71430a2646c1082a494e3519f
2009-06-19 18:32:54 +00:00
danielk1977
d6bee2174c If a call is made to sqlite3PagerAcquire when there are no outstanding references to any pages and the pager is in the error-state, try to exit the error-state at this point. Previously this was only attempted if the pager was configured to use exclusive mode. (CVS 6788)
FossilOrigin-Name: 62db08bc0de936e4a418ae583a3bdbbf33d7787e
2009-06-19 17:50:01 +00:00
drh
8bfd719065 Make sure group_concat() ignores initial NULL values. (CVS 6787)
FossilOrigin-Name: 90c3b23ccac8a9e7fc1cc831e43888e4e43badc9
2009-06-19 16:44:41 +00:00
drh
8bfdf72136 Reorganize and cleanup the prepared statement object. Remove code that has
been commented out for ages and is no longer relevant to anything. (CVS 6786)

FossilOrigin-Name: 37ae5f5e8feb34a8e6e8b34aa18df1e9a1ce55cb
2009-06-19 14:06:03 +00:00
drh
0472b5ad3f Fix a possible segfault when backing up an encrypted database. (CVS 6785)
FossilOrigin-Name: 7d8f178c8145b90da31f6557f7cd99d154eb676e
2009-06-19 02:25:48 +00:00
drh
37b89a0186 Make sure the sqlite3VdbeGetOp() subroutine works even when SQLite is
compiled with SQLITE_OMIT_TRACE. (CVS 6784)

FossilOrigin-Name: 1c8ec2a6e4efbb3fdc58f999b7b725fa5dc4d0e9
2009-06-19 00:33:31 +00:00
drh
0719ee29b6 Changes to the backup functionality so that it works better with codecs. (CVS 6783)
FossilOrigin-Name: 87d6796d986e4d5238252e704d936ab4407a0265
2009-06-18 20:52:47 +00:00
drh
fa9601a9a6 Move codec management from database connections into the pager so that it
will work together with shared cache. (CVS 6782)

FossilOrigin-Name: ed08b53cd64c4ff2c94ef4e48441c5236041c9ca
2009-06-18 17:22:39 +00:00
drh
ccf6d0934d Update the filefmt.test test script to conform to the previous check-in. (CVS 6781)
FossilOrigin-Name: 40a40e81b3ad80114422d6a48146e5fb27e2551d
2009-06-18 11:34:42 +00:00
drh
b33e1b99b0 Reduce the minimum usable page space to 480 byte from 500 bytes. (CVS 6780)
FossilOrigin-Name: db4fb835363c9c7e38c891e01188a6e2db88472d
2009-06-18 11:29:20 +00:00
drh
830ecf9197 Remove the P3 operand from OP_IsNull since it was not being used. (CVS 6779)
FossilOrigin-Name: 767ef1e4a1b31abef479368d9f960ecfd6fa08c6
2009-06-18 00:41:55 +00:00
drh
a0c0652111 Avoid an assertion fault if an out-of-memory error occurs while trying
to run the string-concatentation operator on a zero-blob.  (This is an
absurd thing to do, but even so, we still should not fault.) (CVS 6778)

FossilOrigin-Name: 0def0b76b9f4de9ee259ab1cbe71051fd58b73be
2009-06-17 22:50:41 +00:00
drh
3a9cf17d7c Fix a problem in vdbe.c that could cause a double-free of memory if the
SQLITE_LIMIT_LENGTH is changed after a statement is prepared but before
it is run.  Also remove debugging statements from tkt3841.test. (CVS 6777)

FossilOrigin-Name: 3d7327fd6af983d5ce9bc9a2ba869b23c44cc8e6
2009-06-17 21:42:33 +00:00
drh
94c3a2b16f Use caution to avoid integer overflow when doing real to integer affinity
operations.  Ticket #3922. (CVS 6776)

FossilOrigin-Name: 392559465d499f491907ef7f42d37a1a6c699511
2009-06-17 16:20:04 +00:00
drh
042d6a1f0f Fix a potential segfault following database corruption. Problem
made visible by check-in (6772). (CVS 6775)

FossilOrigin-Name: 69eb0ff817cff6266c53b79047bcff5e5d54b618
2009-06-17 13:57:16 +00:00
drh
0d588bbc38 Suppress some -Wextra compiler warnings from GCC. (CVS 6774)
FossilOrigin-Name: 59ec937ce226bbf6c48c5e0466d3bab48873c9ea
2009-06-17 13:09:38 +00:00
danielk1977
11a8a8660c Fix a bug affecting secure-delete mode introduced by (6768). (CVS 6773)
FossilOrigin-Name: a433ca821c134caeac0fa16416eb95c647416b95
2009-06-17 11:49:52 +00:00
danielk1977
e576521d96 Fix for #3918. Also, fix the TRACE macros in balance_nonroot(). (CVS 6772)
FossilOrigin-Name: 368e44ec2e648b04f3b817f82586ccd864e60c89
2009-06-17 11:13:28 +00:00
drh
b5092d18a4 A minor simplification to the tokenizer. (CVS 6771)
FossilOrigin-Name: 18f2076ac21dd0ab343a79461837f5591f9d4d87
2009-06-17 01:17:13 +00:00
drh
58fbb314ae Changes to prepare.c and callback.c to promote better test coverage. (CVS 6770)
FossilOrigin-Name: 08cca219f16efab93cb00f04d2e2f8033893e5f1
2009-06-17 00:35:30 +00:00
drh
9da742f969 Changes sqlite3_prepare_v2() (and related routines) so that if it fails due
to a missing table and the schema is out of date, it retries once before
returning SQLITE_SCHEMA.  Other changes to prepare.c to facilitate coverage
testing. (CVS 6769)

FossilOrigin-Name: 256ec3c6af41c2324db82e4deb54edbba5b581e8
2009-06-16 17:49:36 +00:00
danielk1977
4dbaa89005 Changes to balance_nonroot() and BtreeDelete() to simplify delete operations and reduce stack/heap usage while balancing b-tree structures. (CVS 6768)
FossilOrigin-Name: 092b276e7d89bbfa3d8637a90ee5d458935a12a9
2009-06-16 16:50:22 +00:00
shane
e26fa4c959 Fix a link error and warning that can occur in where.c when compiling under MSVC with SQLITE_OMIT_VIRTUALTABLE defined. Ticket #3914. (CVS 6767)
FossilOrigin-Name: 793c93be16af535e102dba147125384f6814cf5f
2009-06-16 14:15:22 +00:00
danielk1977
0d7d3a3315 Leave out a redundant line in build.c. Ticket #3916. (CVS 6766)
FossilOrigin-Name: d9f997aeb7a2195d0e16fe1555626918902b4f91
2009-06-16 04:35:39 +00:00
danielk1977
cb55799952 Remove a duplicate assert from btree.c. Ticket #3915. (CVS 6765)
FossilOrigin-Name: d89542cd8b2efaea7c6be6cd7787d183c55ae36a
2009-06-16 04:31:49 +00:00
drh
f7828b5cd6 Additional updates to the symbol resolver and expression tree walker to
facilitate test coverage. (CVS 6764)

FossilOrigin-Name: a49c2d4befcc33dd98543fe7b4d4f0bae56f1a90
2009-06-15 23:15:59 +00:00
drh
0b3bf92417 Changes to allow a clean compile with no floating-point instructions
generated when SQLITE_OMIT_FLOATING_POINT is used. (CVS 6763)

FossilOrigin-Name: 1591b8322babebc45df3b799cc5e457288f28594
2009-06-15 20:45:34 +00:00
drh
73c0fdc7fa Updates to resolve.c to facilitate full coverage testing. (CVS 6762)
FossilOrigin-Name: c50f0f28df1dfdccf1d159c983b616cd9b823955
2009-06-15 18:32:36 +00:00
shane
8509570763 Fix compiler warnings with MSVC build. (CVS 6761)
FossilOrigin-Name: e1e6430752449a34671b6c89326b03ac36ea6d9a
2009-06-15 16:27:08 +00:00
drh
1faecd9c50 Version 3.6.15 (CVS 6760)
FossilOrigin-Name: aff34826aa4667d24f0dbc8bea828dc0f84d2108
2009-06-15 03:28:57 +00:00
drh
0444610098 Update the configuration script for version 3.6.15. (CVS 6759)
FossilOrigin-Name: 14df65dc04e1a944baf4fb7185a0df5a96059346
2009-06-15 00:04:06 +00:00
drh
eac74428c1 Detect database corruption and abort balance_nonroot() before the
corruption causes problems. (CVS 6758)

FossilOrigin-Name: 3448b39dcd580880a9326414e7e4952c4fbc313d
2009-06-14 12:47:11 +00:00
drh
c53eed1703 Change lemon so that it does not generate yytestcase() macros on destructor
cases since destructors are commonly unreachable in a reasonable grammar.
For the reduce-rule switch, gather all no-ops into the "default:" case. (CVS 6757)

FossilOrigin-Name: caebfe82cb1b1215a85ed48fe97360c5422c52e0
2009-06-12 17:46:19 +00:00
drh
7501301e8d The previous check-in ((6755)) put in more yytestcase() macros than are
called for.  This check-in addresses that problem. (CVS 6756)

FossilOrigin-Name: a5b182f93b9e57754c8b9507cf491a7bbf0fd127
2009-06-12 15:47:34 +00:00
drh
8a415d3743 The lemon parser generator now inserts yytestcase() macros on reduce action
and on each destructor, to verify that all have been executed.  yytestcase()
is a no-op by default but can be set to something more useful inside
of %include. (CVS 6755)

FossilOrigin-Name: fe9c9177340a3dc372ffa1b851030d005e0c46db
2009-06-12 13:53:51 +00:00
drh
1441f3e083 In lemon: omit unused entries from the end of the yyFallback array. (CVS 6754)
FossilOrigin-Name: 9cfbe2ba68470a2850a7d7a64eb088f7b422a3e5
2009-06-12 12:50:50 +00:00
drh
994704d1cb Enable the SQLITE_LIMIT_FUNCTION_ARG limiter. (CVS 6753)
FossilOrigin-Name: a17e3317176772446abdc8ebe6fb6f0d3b7ac018
2009-06-12 12:04:16 +00:00
drh
8be4f639d9 Remove a C++-ism from the code. Ticket #3912. (CVS 6752)
FossilOrigin-Name: bc729bc3e6f6e3570103e646080eb119311b0fa7
2009-06-12 11:42:11 +00:00
drh
13d32d196e An additional memory leak in the parser fixed. Ticket #3911. (CVS 6751)
FossilOrigin-Name: 6197b492714e16396941ae6ba61f90f708d54728
2009-06-12 03:47:36 +00:00
drh
c3a8402a94 Make sure nested queries with USING clauses do not leak memory.
Preliminary fix for ticket #3911. (CVS 6750)

FossilOrigin-Name: bd341a103c25395b1189d05edebfe4af8a943941
2009-06-12 03:27:26 +00:00
drh
d3ec02d38e Modifications to the parser to eliminate unreachable code. (CVS 6749)
FossilOrigin-Name: 457e0b245b1833c0d297bc6f4ff9785e6a2cee02
2009-06-12 02:27:14 +00:00
drh
aed2460877 Honor the SQLITE_OPEN_READONLY flag even on a :memory: or temporary database,
even though such a database is pointless.  Ticket #3908. (CVS 6748)

FossilOrigin-Name: 73ba841ac1ed39fb09b3917bafe0ce349e88eb04
2009-06-11 17:32:45 +00:00
drh
2c1a0c568f Add an ALWAYS() to a conditional in where.c. (CVS 6747)
FossilOrigin-Name: 1fdb3e1e9af0672072f133dde06594fea2ef13c5
2009-06-11 17:04:28 +00:00
drh
85d2bd22f1 Changes to reenable codec operation and to handle memory allocation
failures within a codec. (CVS 6746)

FossilOrigin-Name: 43a6ca98b1a6aff1f0f674ecabdc929efb314db7
2009-06-11 00:47:20 +00:00
drh
5901b571d4 Do not let the reverse_unordered_selects pragma force the use of an index that
would not otherwise be used.  Ticket #3904.
Also: remove an test which is always true. (CVS 6745)

FossilOrigin-Name: 78a391dca05dbe3ad1d8124b80b31bc2ce75778f
2009-06-10 19:33:28 +00:00
drh
85119c32ad Remove a NEVER() that can sometimes occur on an OOM error. (CVS 6744)
FossilOrigin-Name: c27f23bbafd2e4fa453c8e3b83667ea8173183a7
2009-06-10 11:07:00 +00:00
danielk1977
e56b60ecb8 Minor tweak to balance_quick() to save a few instructions. (CVS 6743)
FossilOrigin-Name: 9ace995910c8b0b9e95dc20fd70be487199e37af
2009-06-10 09:11:06 +00:00
drh
6860da015f Remove the actual checks that verify that memory pools (such as set up
using SQLITE_CONFIG_HEAP) are 8-byte aligned.  But document that 8-byte
alignment is required. (CVS 6742)

FossilOrigin-Name: e9b55ccc8b6d4f21c9c8f8e7ba053475833fc833
2009-06-09 19:53:58 +00:00
shane
75ac1de0ad Fix compiler warnings with MSVC build. (CVS 6741)
FossilOrigin-Name: 0bd84e7387802c58c820369ff27ef54adbdf2e96
2009-06-09 18:58:52 +00:00
shane
68c0273755 Avoid a false failure report in the test scripts caused by the vdbe stack "compression" script. (CVS 6740)
FossilOrigin-Name: 9d3329891c2227a1a3ded1c636ac615864010ca7
2009-06-09 18:14:18 +00:00
drh
39bf74a288 Require that the buffer specified by SQLITE_CONFIG_HEAP be 8-byte aligned. (CVS 6739)
FossilOrigin-Name: 18b78068cc94de51f081824c93f7b14c7c35726d
2009-06-09 18:02:10 +00:00
drh
19f81f6cdd Changes to tokenize.c to facilitate full coverage testing. (CVS 6738)
FossilOrigin-Name: 5e8c48cff7e96e6030b796dba409844f4c758a60
2009-06-09 18:01:37 +00:00
danielk1977
b46d004548 Change savepoint4.test to limit database growth. Otherwise the test can take a very long time to run, depending on the prng. (CVS 6737)
FossilOrigin-Name: ed1d4f47ee9a2bcafdee92ee6bfcb2b0d1758f76
2009-06-09 15:25:33 +00:00
drh
9bb6697ac6 Modify mkkeywordhash.c so that it puts the original text of each token in
a comment beside the "testcase()" macros. (CVS 6736)

FossilOrigin-Name: a7d0817c176832a88788cc973c0aae8dcab57364
2009-06-09 14:27:41 +00:00
drh
3b2a3fa42e Enable cell overflow checking in sqlite3BtreeInitPage() using the
compile-time option SQLITE_ENABLE_OVERSIZE_CELL_CHECK.  Change the tests
so that they recognize different error messages depending on the setting
of this macro. (CVS 6735)

FossilOrigin-Name: 56bff6eb2fc5f0afbd96afc986671ec744bd40e1
2009-06-09 13:42:24 +00:00
danielk1977
80929b3de9 Avoid calling fillInCell() to create an internal node intkey cell from balance_nonroot(). A single putVarint() does the same thing more quickly. (CVS 6734)
FossilOrigin-Name: 2e5d42aeb40c3c6eea373a9ae3fbdf4e8087cd58
2009-06-09 11:34:10 +00:00
drh
f061be9c6f Only do the cell overread checks in sqlite3BtreeInitPage if
SQLITE_OVERREAD_CHECK is defined at compile-time. (CVS 6733)

FossilOrigin-Name: 49f544ebae8dc3cf7cf6189536c56ebb7d258a86
2009-06-09 10:37:03 +00:00
danielk1977
6067a9bbfe Do not clear the MemPage.nFree variable when insertCell() adds an overflow cell to a page. Not doing this means balance_quick() can avoid a call to sqlite3BtreeInitPage(). (CVS 6732)
FossilOrigin-Name: 8f1c1f61f7bc5270212725cf0a056872df983f49
2009-06-09 09:41:00 +00:00
drh
254993e2e5 Additional comments to clarify the operation of the LIKE optimizer in
where.c. (CVS 6731)

FossilOrigin-Name: cc9c12170c3f6f0f485977e47e7fbb75c50e82b1
2009-06-08 19:44:36 +00:00
drh
4e8be3bb5d Clarification of the operation of the OR-term optimizer in where.c. (CVS 6730)
FossilOrigin-Name: 6b42dc3d04e98f91c203c277926ed6ead62a9270
2009-06-08 17:11:08 +00:00
danielk1977
a50d9aa784 Change the btree balance code so that it does not call balance_nonroot() recursively. (CVS 6729)
FossilOrigin-Name: 7863db904d6fc36417c923e3d135eb2c145b9013
2009-06-08 14:49:45 +00:00
drh
b054068d21 Increase the version number to 3.6.15 in preparation for the next release. (CVS 6728)
FossilOrigin-Name: 456ea541d67221a573b63e264c83f4448f2ed569
2009-06-08 12:52:47 +00:00
drh
c4ac22e905 Disable the LIKE optimization if the affinity of the LHS column is
not TEXT.  Ticket #3901. (CVS 6727)

FossilOrigin-Name: a255c645c46ae03b65f862858fe57e462076e1fc
2009-06-07 23:45:10 +00:00
drh
49008596ed Update the error message on one of the corruption tests to account for the fact
that we are finding the corruption sooner. (CVS 6726)

FossilOrigin-Name: ba9848e7b89df1fb6bf6db2b9d66cd3ffce375df
2009-06-06 19:21:13 +00:00
danielk1977
08746af43b Fix an error in the malloc.test test script causing a small buffer overread. (CVS 6725)
FossilOrigin-Name: 4d129bee696f3a537f7ea5501a387012fc08c27e
2009-06-06 16:08:22 +00:00
drh
125feffc89 Make sure the result of sqlite3VdbeGetOp() is not used as an array following
an OOM error, since after (6691) it might be a single-entry dummy opcode. (CVS 6724)

FossilOrigin-Name: 127b13981960a9690de09e8f9d0b38a4bd76015f
2009-06-06 15:17:27 +00:00
danielk1977
41f5b04ceb When building in debug mode with gcc, force the nullMem variable in function columnMem() to be aligned to an 8-byte boundary. Otherwise an assert() statement may fail. (CVS 6723)
FossilOrigin-Name: 3fd6c72da599347af70897b30b86a4ba641d4cd9
2009-06-06 14:13:26 +00:00
drh
acfc72bea4 Detect when database corruption causes an attemp to set the pointer map
value for a pointer map page and report the corruption. (CVS 6722)

FossilOrigin-Name: 3ae4880bee3a0312c61cdd36f4fa50286cc2ef48
2009-06-05 18:44:15 +00:00
drh
dda70fe38e Remove leftover "breakpoint" commands from test scripts. Also remove blank
lines at the end of scripts. (CVS 6721)

FossilOrigin-Name: 1fef16ec2b89981770cf44f606a420fbe031a7a4
2009-06-05 17:09:11 +00:00
drh
bfb19dc698 Do not cast an unsigned int into an int for comparison. (CVS 6720)
FossilOrigin-Name: 302ab855e62dfae8507800302dae479e0494b81a
2009-06-05 16:46:53 +00:00
drh
35cd643cc7 Take care that a corrupt variable-length integer does not cause 32-bit
integer overflow when parsing a record format, nor cause excessively large
memory allocations. (CVS 6719)

FossilOrigin-Name: 38b20327a80996c7044b88be32161ac4ac0ec3a9
2009-06-05 14:17:21 +00:00
drh
1662b5a6f9 Earlier detection of freelist corruption in the page allocation routines. (CVS 6718)
FossilOrigin-Name: e557c8e5846f9c4eaaeb3bd07614ac101bb0b3d0
2009-06-04 19:06:09 +00:00
drh
d46b6c23d3 Fix an assertion fault in balance_quick() that occurs when an interior
btree node has zero cells due to database corruption.  Also update the
corrupt7.test result vectors for a couple of cases where the error report
on database corruption changed due to earlier detection. (CVS 6717)

FossilOrigin-Name: 1335e4440f5a3d24ce9ce187e0e23fc9b166ca98
2009-06-04 17:02:51 +00:00
drh
c85240dbf6 If the root page of a btree is empty and is also not a leaf page and the
page is not page 1, then report database corruption. (CVS 6716)

FossilOrigin-Name: 52b02ca5f3e5fdf2f3e02e9d8e016028d0842818
2009-06-04 16:14:33 +00:00
danielk1977
6f235cc5de Reduce the stack usage of balance_quick(). (CVS 6715)
FossilOrigin-Name: e7ad68e93b19b59cb16205c4b48fd9d6492dbb02
2009-06-04 14:46:08 +00:00
shane
e71169ba30 Minor updates to comments in test scripts. (CVS 6714)
FossilOrigin-Name: 453ff88f73a01a54ff464563effdb63014b1972c
2009-06-04 02:47:03 +00:00
shane
bbc795fdaf Minor tweak to test script to ensure every byte in file touched at least once. (CVS 6713)
FossilOrigin-Name: bc6c2d894b711361808a19b673803186d3a28369
2009-06-04 02:46:19 +00:00
drh
c5e47ac238 Fix two instances where a malformed header in a database file (in other words
a corrupt database file) can lead to an assertion fault. (CVS 6712)

FossilOrigin-Name: 4e92c7f20afa51849128aa1d784ab885b517a73d
2009-06-04 00:11:56 +00:00
drh
69e931e7bb Change the pcache1.c implementation so that the "header" occurs at the end
of page buffer, not at the beginning.  This insures that the 20 bytes
immediately following the page buffer are mapped if a read of the page
buffer overruns due to a malformed cell. (CVS 6711)

FossilOrigin-Name: c54de1f54080de7e134d7b562498abb5337a0a46
2009-06-03 21:04:35 +00:00
danielk1977
93c829c110 Add corruptD.test, a container for testing the "cell overflow" problem. Also shuffle a small amount of code in BtreeInitPage() to check that the page header pointer to the start of the cell offset array is set to a sane value. (CVS 6710)
FossilOrigin-Name: 7fa5d3cb0fa05f7d901bcc139c2c037ce5944caa
2009-06-03 17:26:17 +00:00
danielk1977
0d19f7ac57 Define a set of constants to use as the "index" argument to sqlite3BtreeGetMeta and UpdateMeta. This makes some parts of the code easier to follow. (CVS 6709)
FossilOrigin-Name: 6dbf4eca00f845baa7200aba421d0bc158ba96aa
2009-06-03 11:25:07 +00:00
drh
50d654da3b Additional changes to reduce stack usage. The SQLITE_SMALL_STACK compile-time
option is now available. (CVS 6708)

FossilOrigin-Name: baea79fd0cfeb860973846c3f2776776c87f0ae3
2009-06-03 01:24:54 +00:00
drh
e98c9049a0 Further reductions in the amount of stack space required. (CVS 6707)
FossilOrigin-Name: 04bad9eb6dd8bf7cafc9f3918b676e95d5b1c984
2009-06-02 21:31:38 +00:00
drh
c54a617e1f Tweaks to vdbe.c to further reduce stack space requirements. (CVS 6706)
FossilOrigin-Name: 6f2aab3f7be12710b703eda22b1d5c0e8f85f814
2009-06-02 16:06:03 +00:00
drh
e4a96be62b Add a test case for ticket #3893 and ticket #3894. (CVS 6705)
FossilOrigin-Name: 2472f6db95cd537a908bdbbbbc41bad2bd987b2f
2009-06-02 15:47:37 +00:00
drh
856c10375d Add the vdbe-compress.tcl script which automatically refactors the
sqlite3VdbeExec() routine to use less stack space.  Use this script
when constructing the amalgamation. (CVS 6704)

FossilOrigin-Name: 7f43391831b03e53d967acee6ae02089740aaedb
2009-06-02 15:21:42 +00:00
drh
6ee700c32c Avoid allocating large objects on the stack in the incremental BLOB I/O
interface. (CVS 6703)

FossilOrigin-Name: ea7dfde700fb57ed0ecb5000a55abbf45aa1e09d
2009-06-01 19:53:30 +00:00
drh
e7b3470705 Malloc for space to hold the Parse object in sqlite3_prepare() and friends.
Or, if compiled with SQLITE_USE_ALLOCA, obtain space for the object from
alloca(). (CVS 6702)

FossilOrigin-Name: c7c0c58e472cd8277b2ad58bb60834190bace4fa
2009-06-01 18:18:20 +00:00
shane
ddfefca736 Added assert to verify winMutex system is inited before "static" mutexes are used. (CVS 6701)
FossilOrigin-Name: b126013b5a1d6526810139d19acbec7fd0ab8168
2009-06-01 17:10:22 +00:00
shane
61b82d6aa5 Ensure that "static" mutexes are deleted on shutdown so that they are not leaked across restarts. (CVS 6700)
FossilOrigin-Name: 4e75897ee177bd24145f9dbfccd41a03c108440f
2009-06-01 17:06:07 +00:00
shane
cf6973963a Fix compiler warnings with MSVC build. (CVS 6699)
FossilOrigin-Name: 0791588520603d106aa0b8ce24d68b740b7b80c8
2009-06-01 16:53:09 +00:00
shane
739a277031 Fix a couple of Windows only issues with test scripts. (CVS 6698)
FossilOrigin-Name: 0f6bc5e1ba6937b36df08ed3b5903839389021bb
2009-06-01 16:42:17 +00:00
drh
d6b8c43474 Code simplifications to facilitate coverage testing following the recent
changes to the Expr object. (CVS 6697)

FossilOrigin-Name: ee9a144d448a76f29c3ca03851c1aeef539068e2
2009-05-31 21:21:40 +00:00
drh
de7446bd85 Fix the ".genfkey" command of the CLI so that it does not leak memory
if sqlite3_realloc() fails.  Ticket #3891. (CVS 6696)

FossilOrigin-Name: a028d69c70ae961f418052a91aa1518e80a8ddf5
2009-05-31 17:16:09 +00:00
drh
20bc393c6a Fix typo reported by ticket #3888. Other minor edits to facilitate
coverage testing. (CVS 6695)

FossilOrigin-Name: 164adf261d2536f16c83e44f6482dfb3d04a45d5
2009-05-30 23:35:43 +00:00
drh
33cd490992 Simplifications to the expr.c source module resulting from structural
testing. (CVS 6694)

FossilOrigin-Name: f760bb7a0372d11ac7e3287b8a56fc4261e6371c
2009-05-30 20:49:20 +00:00
drh
f7bca5740d Fix for ticket #3887. Other unrelated bits of code cleanup in the expr.c
source module. (CVS 6693)

FossilOrigin-Name: 00e7250f11e190cd915870438d172f574d110e6d
2009-05-30 14:16:31 +00:00
danielk1977
43996e858b In vacuum.c use "PagerIsMemdb(X)" instead of "PagerFile(X)->pMethods==0". (CVS 6692)
FossilOrigin-Name: 874295ce71380da3f4c9296df0e0ce5ece136220
2009-05-30 10:46:10 +00:00
drh
20411ea700 Enhance the sqlite3VdbeGetOp() routine so that it always returns a pointer
to VdbeOp, even following an OOM fault.  This simplifies error handling in
callers.  Cleanup to the column cache logic and the expr.c source module. (CVS 6691)

FossilOrigin-Name: ede06dacdf7acab23cd9666a0a0d092a637bcb78
2009-05-29 19:00:12 +00:00
drh
fd773cf970 Refinements in expression handling logic that have resulted from recent
structural testing. (CVS 6690)

FossilOrigin-Name: bd89f2c29b00e6b473f30c2e929d2f626721ad92
2009-05-29 14:39:07 +00:00
drh
9fe769f129 Still more refinements to the hasHotJournal() fix of ticket #3883. (CVS 6689)
FossilOrigin-Name: 726b425e43e5d864e7e83853bdf134debc1ffb59
2009-05-29 11:57:38 +00:00
drh
cc0acb261e The hasHotJournal() fix of check-in (6687) causes some minor problems in
various alternative operating modes, such as locking_mode=EXCLUSIVE.  This
additional patch attempts to fix those concerns.  Ticket #3883. (CVS 6688)

FossilOrigin-Name: a2ba61d927a06c390a9a818a013328092b802222
2009-05-29 10:55:29 +00:00
drh
f0039ad815 Modify the hasHotJournal() routine to return a false-positive if it is
unable to open the journal file to check its header due to a race
condition.  Processing downstream of hasHotJournal() already knows how to
deal with false-positives.  Ticket #3883. (CVS 6687)

FossilOrigin-Name: d6b5d8e1ab8e5d3348ace560230702718a2a8af9
2009-05-29 00:30:30 +00:00
drh
b74b101766 Remove references to deleted function sqlite3ExprRegister(). Changes to
the expr.c source module to promote better testing. (CVS 6686)

FossilOrigin-Name: 6ae4ad6ebee4db88c411df97bb1de574708dd53c
2009-05-28 21:04:37 +00:00
drh
2c220455b9 Fix a NULL pointer dereference following an OOM error in the column name
resolver. (CVS 6685)

FossilOrigin-Name: 3b46142532934d17aa136c2e56e58e7828df0f54
2009-05-28 14:34:49 +00:00
drh
0b0745ae37 Make sure the column name resolver does not try to duplicate Expr.u.zToken
when the Expr.u.iValue union member is the element being used. (CVS 6684)

FossilOrigin-Name: 376ecf0d87e4a2329f5861401f83ed9ceb35d528
2009-05-28 12:49:53 +00:00
danielk1977
4b0aa4cf3e Workaround the need for internal API sqlite3BtreeCursorDb(). It was only being used for an assert() statement, which can be done differently. (CVS 6683)
FossilOrigin-Name: 5904af6e6df3effdaaa30e7cf96ee316fc09b28d
2009-05-28 11:05:57 +00:00
drh
33e619fc1c Additional refinements to Expr handling. Restore compression of trigger
expressions.  Change Expr.zToken to Expr.u.zToken and added Expr.u.iValue.
Remove an unnecessary ExprDup from CHECK constraint processing.  And so forth. (CVS 6682)

FossilOrigin-Name: 4ac2bdfbb4230b6ceaae87e738fa61036bbe03cb
2009-05-28 01:00:55 +00:00
drh
b7916a78ff Simplifications to the Expr object: Remove Expr.span completely and convert
Expr.token into a char* Expr.zToken.  Also simplify the Token object by
removing the Token.dyn and Token.quoted fields. (CVS 6681)

FossilOrigin-Name: 7cb1c3ba0759539cb035978fdaff6316775986f3
2009-05-27 10:31:29 +00:00
drh
38a2c01b09 Fix the rtree test module so that it works even if the ext/ subfolder is
omitted from the tree. (CVS 6679)

FossilOrigin-Name: 086206e1f51e22ce7b9f45865b370088db126cd2
2009-05-25 14:17:35 +00:00
drh
5cd792399a When pinning a temp register after it is reused by the column cache, make
sure all instances of that register in the cache are pinned so that the
register is never reused for a different purpose.  Ticket #3879. (CVS 6676)

FossilOrigin-Name: 5f358e63712e8de93bd6fecc5131badeef0292be
2009-05-25 11:46:29 +00:00
danielk1977
d17fe2a352 Add a test case for ticket #3879. (CVS 6675)
FossilOrigin-Name: 5b9b66f47b0b8178427806149958387d32b70dc2
2009-05-25 11:46:10 +00:00
drh
09943b53dd Additional clarification of the 3rd parameter to sqlite3_create_function().
Documentation change only; no changes to code.  Ticket #3875. (CVS 6674)

FossilOrigin-Name: dd75e376e8fed4f2e347672d483ee7c1929007cf
2009-05-24 21:59:27 +00:00
drh
091bc7bb16 In the previous, the upper bound on the number of function arguments is
127, not 255.  Ticket #3876 (CVS 6673)

FossilOrigin-Name: 4fe4c5fac51c0a5b50f839a3f43d786e1ff4a4e0
2009-05-24 11:08:49 +00:00
drh
97602f8593 Correct and clarify the documentation on the third parameter to
sqlite3_create_function(). (CVS 6672)

FossilOrigin-Name: 6b7929ed36fa14291b6cb09de5808100945ad7a0
2009-05-24 11:07:49 +00:00
danielk1977
e672c8ed91 Do not transform a WHERE clause of the form "a = ? OR a = ?" to "a IN (?, ?)" if "a" is a column of a virtual table. Ticket #3871. (CVS 6671)
FossilOrigin-Name: fad88e71cf195e703f7b56b13f0c1818fd0dac84
2009-05-22 15:43:26 +00:00
drh
dd1f4321ab Add an assert() to pcache1.c to double-check that page cache buffer memory
is never allocated if pcache1 is not enabled.  Ticket #3872 (CVS 6670)

FossilOrigin-Name: 93369d91abe10975507ea9302c145e3ddd0c2c76
2009-05-22 11:12:23 +00:00
drh
f4622dc176 Additional changes to pcache1 to prevent the page buffer memory from being
configured if pcache1 is not enabled.  Ticket #3872. (CVS 6669)

FossilOrigin-Name: 5153ad19daf0f3b0334b2a06655142899203abbf
2009-05-22 11:10:24 +00:00
drh
b093719a17 Make sure sqlite3_shutdown() completely disables the default pager cache
mechanism in pcache1.c.  Ticket #3872.  Also fix some comments associated
with configuring the page cache. (CVS 6668)

FossilOrigin-Name: 6240992cef5cb867d7a638f1906d05aa8efd0652
2009-05-22 10:53:29 +00:00
drh
4fb0866d58 Add omitted word in the documentation for total_change_count().
ticket #3870. (CVS 6667)

FossilOrigin-Name: 3f6fd16f92a16445891142b0a7dc9f6d6dc06546
2009-05-22 01:02:26 +00:00
drh
49145af9f2 Fix an 8-byte alignment problem on HP/UX. Ticket #3869 (CVS 6666)
FossilOrigin-Name: fc64f8509299a398ac1513e1778f271083e3eabc
2009-05-22 01:00:12 +00:00
drh
51f49f1745 Simplifications to expr.c in support of full coverage testing. (CVS 6665)
FossilOrigin-Name: 309adb5e22af2735b69460c164d870aea99c6da3
2009-05-21 20:41:32 +00:00
drh
157e29a9e3 In the CLI in the ".dump" command, do not attempt to clear the sqlite_sequence
table until the first row of content of that table is seen.  Ticket #3867 (CVS 6664)

FossilOrigin-Name: bedd5ad1942021ef2b3defde3ff3e8aead86137e
2009-05-21 15:15:00 +00:00
drh
4f32476cea In the CLI, always "dump" the sqlite_sequence table last. Ticket #3867 (CVS 6663)
FossilOrigin-Name: a0028d4808275cb1d020d56344d90b2a04603f4d
2009-05-21 14:51:03 +00:00
danielk1977
1ed93e9085 Add conditional 'extern "C"' block to sqlite3async.h. Ticket #3866. (CVS 6662)
FossilOrigin-Name: e4d1b117c90dca341bfa74291c7dfc2afca38cc6
2009-05-21 04:42:19 +00:00
drh
748ce21115 Fix a memory leak that occurs when an out-of-memory error occurs while
preparing a statement that has multiple virtual table updates within
triggers.  Other virtual table changes to support full-coverage testing. (CVS 6661)

FossilOrigin-Name: 02b77a582c65e0eb45eb1a9abbdeef11f52d7ce6
2009-05-20 20:10:47 +00:00
drh
9e27890ed9 Remove unused, undocumented, and untested error reporting logic from the
xFindFunction interface in virtual tables. (CVS 6660)

FossilOrigin-Name: 55d6ced262f5281076e4a68097ed21e150a9c225
2009-05-20 16:22:02 +00:00
drh
7aaa878619 Updates to the extension loading logic to support full coverage testing. (CVS 6659)
FossilOrigin-Name: 929cfbc66f6e2ea6b44417305d0f4ae36567c9bf
2009-05-20 02:40:45 +00:00
drh
43152cf85f Changes to select.c to facilitate full coverage testing. (CVS 6658)
FossilOrigin-Name: f678ed34faab88f4e126e553119773386c7c84fa
2009-05-19 19:04:58 +00:00
drh
367882c27c Improvements to the SQLITE_INT_TO_PTR macro to reduce the number of
warnings.  For some platforms it might be necessary to compile with
the -DHAVE_STDINT_H flag.  Ticket #3860. (CVS 6657)

FossilOrigin-Name: 1b0ee9d188c000a2331caae2e9c8b89b0bcbc0b0
2009-05-19 14:21:28 +00:00
drh
e255086bb2 Update the showdb.c utility so that it works with databases larger than 4GiB. (CVS 6656)
FossilOrigin-Name: 9675b6223645fe01b202cbefae63f3209a50efcc
2009-05-19 03:21:52 +00:00
danielk1977
8d76ff9fe9 Fix memdb.test so that it works when OMIT_AUTOVACUUM is defined. (CVS 6649)
FossilOrigin-Name: 8c3c0c24c82606df41653dbf7324bf9f166c933a
2009-05-18 16:04:38 +00:00
drh
ccfcbcea60 Changes to select.c in support of full coverage testing. (CVS 6647)
FossilOrigin-Name: e225f365bd9353f753161887e05fe1eccaf9be1d
2009-05-18 15:46:07 +00:00
drh
5e49edcabb Fix a typo on a comment associated with check-in (6641) and ticket #3860. (CVS 6646)
FossilOrigin-Name: 43051e0315246d734a81ccef2cf1a0cc159f239b
2009-05-18 13:34:37 +00:00
drh
d2c52f1cfd Remove debugging code accidently left in check-in (6642). Ticket #3862. (CVS 6645)
FossilOrigin-Name: 0d974613473b9d2af71638248a57036f903ef387
2009-05-17 15:29:31 +00:00
drh
03949bac60 Take care to free the memory for the ORDER BY clause on SELECT statements
containing errors and contained within triggers.  Ticket #3863. (CVS 6644)

FossilOrigin-Name: dd665eac8c04259e44a95827ebd1f037460fe1b2
2009-05-17 15:26:20 +00:00
drh
554b3830db Fix a typo in the sqlite3_blob_open() documentation. (CVS 6643)
FossilOrigin-Name: 92866482ef7cc91b5ac7bebec7e6edf900aa64c6
2009-05-17 12:07:47 +00:00
drh
373cc2dd08 Tweaks and simplifications to select.c to facility full coverage testing. (CVS 6642)
FossilOrigin-Name: e3ccbc69babd05d45db8065f6612751eda1aa645
2009-05-17 02:06:14 +00:00
drh
875e9e7d88 Attempt to provide a version of the SQLITE_INT_TO_PTR macro that works
on both llvm-gcc-4.2 and MSVC.  Ticket #3860. (CVS 6641)

FossilOrigin-Name: ddee7ff23e9a396cab89d20ff9fc4cf3dfd4561c
2009-05-16 17:38:21 +00:00
danielk1977
74632880b7 Re-enable file locking in async4.test. (CVS 6640)
FossilOrigin-Name: f7098187280866a56563c7614513a40becd172e0
2009-05-15 14:41:40 +00:00
drh
abda611770 Documentation enhancements for sqlite3_update_hook(), sqlite3_commit_hook(),
and the various incremental blob I/O routines.  No changes to code. (CVS 6639)

FossilOrigin-Name: e8ca932d8c7e1753c159041499355724d3e78b35
2009-05-14 22:37:47 +00:00
drh
dcd7db5dc9 Change the sqlite3_backup_finish() interface so that calling it with
a NULL pointer is a harmless no-op.  One other change to backup.c to facilitate
full coverage testing. (CVS 6638)

FossilOrigin-Name: 06bc89177b3af20751d9567a68551d2d31c3fe8b
2009-05-14 19:26:51 +00:00
shane
089b0a4d9c Documentation updates to better explain the SQLITE_OPEN_EXCLUSIVE flag. Ticket #3855. (CVS 6637)
FossilOrigin-Name: 6bd44f36f46810eb9ce30c7780de6bcfe4aadf5f
2009-05-14 03:21:28 +00:00
drh
8af73d4154 Additional simplifications to build.c in support full coverage testing. (CVS 6636)
FossilOrigin-Name: 913d11149396d3dc797f1efeb4f7e60865483399
2009-05-13 22:58:28 +00:00
drh
b7f24de283 Remove incorrect NEVER() macro in the previous check-in (6634). (CVS 6635)
FossilOrigin-Name: c684957991fe45cbcb188d2a419501c3f1fdc93f
2009-05-13 17:35:23 +00:00
drh
0449171e0c Changes to build.c to help facilitate full coverage testing. (CVS 6634)
FossilOrigin-Name: 264ace50bbaec3468de0e42b2b8cebf9ce1d6682
2009-05-13 17:21:13 +00:00
danielk1977
24d4b29d5b Do not run async4.test as part of the "journaltest" permutation. It specifically tests that the asynchronous IO backend can be configured to violate the assumptions made by journaltest. (CVS 6633)
FossilOrigin-Name: b19bf39bbae96aeb6e742fb9fb1c33d0e251ad7f
2009-05-13 14:46:09 +00:00
danielk1977
e70f4f6482 When locking a database file, check if any backup objects need to be restarted even if the page cache is empty. Ticket #3858. (CVS 6632)
FossilOrigin-Name: 90309008c35494c7a075fe76f7eb96b09a01d01b
2009-05-13 07:52:06 +00:00
drh
8b4aff3919 Remove debugging comments left in the prior check-in by mistake. (CVS 6631)
FossilOrigin-Name: 8207056036e17b99ab660edd650c5a6de1353299
2009-05-12 18:00:37 +00:00
drh
d300171150 Move the sqlite3MinimumFileFormat() routine from build.c over to alter.c
since alter.c is the only code that uses it.  Additional changes and
cleanup to build.c to facility coverage testing. (CVS 6630)

FossilOrigin-Name: 6fe3750a30ab432ed476c2ae6b58972187abc624
2009-05-12 17:46:53 +00:00
drh
b25a9f4618 Make sure the SQLITE_OPEN_EXCLUSIVE flag is ignored by sqlite3_open_v2().
That flag is to be used by the VFS interface only.  Ticket #3855. (CVS 6629)

FossilOrigin-Name: c37f0279ebfaf76b4086e6d16b6e12633424c27d
2009-05-12 13:35:11 +00:00
drh
768578ee2a Tweaks to build.c to facilitate coverage testing. (CVS 6628)
FossilOrigin-Name: 6572b438a02cc44546174e132dfbdc1d141cd451
2009-05-12 00:40:12 +00:00
drh
55f04f281b If a virtual table constructor returns SQLITE_NOMEM, set the mallocFailed
flag in the corresponding database connection to insure that the error
is propagated back to the top layer. (CVS 6627)

FossilOrigin-Name: 5635666f20358e854a76d244768198734afd4299
2009-05-11 23:37:59 +00:00
drh
c4a64facce Rework the logic that generates a schema for tables created using
"CREATE TABLE ... AS SELECT ...".  Instead of trying to copy the raw
datatype string from the right-hand side, just make the type one 
of TEXT, INT, REAL, NUM, or nothing.  This is much simpler than 
trying to parse and quote datatype strings.  Other minor 
implifications to build.c are bundled with this change. (CVS 6626)

FossilOrigin-Name: 33cf83591e6e13875ef6ada5b8ac8ab07619d8bc
2009-05-11 20:53:28 +00:00
drh
aaac8b4e1b Enhance the parser to allow nested parentheses in the module argument of
a CREATE VIRTUAL TABLE statement. (CVS 6625)

FossilOrigin-Name: 93772bd7f56a5158eb46a992ba932f4695cb219f
2009-05-11 18:22:30 +00:00
drh
782b873bf5 Convert an always-true condition in hash.c into an assert(). (CVS 6624)
FossilOrigin-Name: 4237299935b8bf8c346aacba021113224813bcb9
2009-05-09 23:29:12 +00:00
drh
f3af63f941 Add the SQLITE_TESTCTRL_ASSERT and SQLITE_TESTCTRL_ALWAYS codes for the
sqlite3_test_control() interface. (CVS 6623)

FossilOrigin-Name: 38df91c2edebee22d02b5f84260ee9e5e14db48e
2009-05-09 18:59:42 +00:00