]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
16 years agoFurther simplifications to pager.c in support of structural coverage testing. (CVS...
drh [Fri, 24 Jul 2009 19:01:19 +0000 (19:01 +0000)] 
Further simplifications to pager.c in support of structural coverage testing. (CVS 6929)

FossilOrigin-Name: 866216c0b6ba23b66483046fb402ddbe4f9a7b14

16 years agoAllow virtual tables to be used in shared-cache mode. (CVS 6928)
danielk1977 [Fri, 24 Jul 2009 17:58:53 +0000 (17:58 +0000)] 
Allow virtual tables to be used in shared-cache mode. (CVS 6928)

FossilOrigin-Name: 5d9e767a05e381235e064061043e30cc03a11a07

16 years agoSimplifications to pager.c in support of structural coverage testing. (CVS 6927)
drh [Fri, 24 Jul 2009 16:32:00 +0000 (16:32 +0000)] 
Simplifications to pager.c in support of structural coverage testing. (CVS 6927)

FossilOrigin-Name: 7222ad2667b95d6021d9ae47f548b76b224f46aa

16 years agoSimplifications and comment improvements in pager.c. (CVS 6926)
drh [Fri, 24 Jul 2009 12:35:57 +0000 (12:35 +0000)] 
Simplifications and comment improvements in pager.c. (CVS 6926)

FossilOrigin-Name: 2d2f42ca0a24ed8b33f9ad560c76a6c1301c757b

16 years agoSimplifications and comment enhancements on btree.c. (CVS 6925)
drh [Thu, 23 Jul 2009 01:43:59 +0000 (01:43 +0000)] 
Simplifications and comment enhancements on btree.c. (CVS 6925)

FossilOrigin-Name: 5ba880dde8a219543ced6f792c7f9ecdcd8c1cbb

16 years agoModify mksqlite3c.tcl so that it inserts SQLITE_API macros into sqlite3.h. Ticket...
danielk1977 [Wed, 22 Jul 2009 18:24:53 +0000 (18:24 +0000)] 
Modify mksqlite3c.tcl so that it inserts SQLITE_API macros into sqlite3.h. Ticket #3983. (CVS 6924)

FossilOrigin-Name: 803ec79f3b05fdd680f9ab762685bbd50a087b9b

16 years agoSimplifications to btree.c in support of coverage testing. (CVS 6923)
drh [Wed, 22 Jul 2009 18:07:40 +0000 (18:07 +0000)] 
Simplifications to btree.c in support of coverage testing. (CVS 6923)

FossilOrigin-Name: 375fd6f9c54fa5aa8cfae30845c7bfc0ec49e8fa

16 years agoAvoid leaving a suspect page in the page-cache if an error occurs during sqlite3Pager...
danielk1977 [Wed, 22 Jul 2009 16:41:15 +0000 (16:41 +0000)] 
Avoid leaving a suspect page in the page-cache if an error occurs during sqlite3PagerAcquire(). (CVS 6922)

FossilOrigin-Name: 2594f01c73301f9432be9d007a079a19a3d383f9

16 years agoFix a double-free that can occur after database corruption is detected. (CVS 6921)
danielk1977 [Wed, 22 Jul 2009 14:08:13 +0000 (14:08 +0000)] 
Fix a double-free that can occur after database corruption is detected. (CVS 6921)

FossilOrigin-Name: 5260e8b1048af2e00d49706466d9aded90c24ed2

16 years agoAdd a NEVER() macro around a pager.c conditional that must always be false
drh [Wed, 22 Jul 2009 13:19:20 +0000 (13:19 +0000)] 
Add a NEVER() macro around a pager.c conditional that must always be false
in the current implementation. (CVS 6920)

FossilOrigin-Name: 1e510d7fc5cc47fe2714dbb1ed3ea7e90acbff7b

16 years agoChanges to test code (only) to allow veryquick.test to run with OMIT_UTF16 builsd...
danielk1977 [Wed, 22 Jul 2009 07:27:56 +0000 (07:27 +0000)] 
Changes to test code (only) to allow veryquick.test to run with OMIT_UTF16 builsd. Ticket #3985. (CVS 6919)

FossilOrigin-Name: 7f3fc7f20f6dc205eedbe445e35f5071f1c01185

16 years agoRemove an ALWAYS() from a condition that can in fact be false under very
drh [Wed, 22 Jul 2009 02:02:39 +0000 (02:02 +0000)] 
Remove an ALWAYS() from a condition that can in fact be false under very
obscure circumstances. (CVS 6918)

FossilOrigin-Name: 38083228956ac05df45f44447ab39c64852239d2

16 years agoFurther simplifications to btree.c, especially the sqlite3BtreeKey() and
drh [Wed, 22 Jul 2009 00:35:23 +0000 (00:35 +0000)] 
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

16 years agoChange getAndInitPage() (btree.c) to use only PagerAcquire(), not PagerLookup() and...
danielk1977 [Tue, 21 Jul 2009 19:25:24 +0000 (19:25 +0000)] 
Change getAndInitPage() (btree.c) to use only PagerAcquire(), not PagerLookup() and PagerAcquire(). (CVS 6916)

FossilOrigin-Name: 0b41dfc066b60ccabbf1a9ab4db41ebcb73a2799

16 years agoAdditional simplifications to btree.c in support of coverage testing. (CVS 6915)
drh [Tue, 21 Jul 2009 19:02:20 +0000 (19:02 +0000)] 
Additional simplifications to btree.c in support of coverage testing. (CVS 6915)

FossilOrigin-Name: 716fccea58c4c217e68e04e0776e44ae39c11950

16 years agoRemove an assert() in btree.c which is no longer true due to changes in
drh [Tue, 21 Jul 2009 15:33:14 +0000 (15:33 +0000)] 
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

16 years agoChanges to btree.c in support of coverage testing. (CVS 6913)
drh [Tue, 21 Jul 2009 11:52:34 +0000 (11:52 +0000)] 
Changes to btree.c in support of coverage testing. (CVS 6913)

FossilOrigin-Name: 4cf23e9e860bd6245344884ec84f487fdf36f86f

16 years agoReverse the order of two conditionals in a test in order to achieve coverage
drh [Mon, 20 Jul 2009 19:30:00 +0000 (19:30 +0000)] 
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

16 years agoModify various routines inside btree.c to take a pointer to the return-code
drh [Mon, 20 Jul 2009 17:11:49 +0000 (17:11 +0000)] 
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

16 years agoUse an ALWAYS() on a conditional in btmutex.c that is always true. (CVS 6910)
drh [Mon, 20 Jul 2009 12:33:32 +0000 (12:33 +0000)] 
Use an ALWAYS() on a conditional in btmutex.c that is always true. (CVS 6910)

FossilOrigin-Name: 609022caff12c010575e704be550da6f52226d33

16 years agoCorrections to the comment that is inserted at the top of the amalgamation.
drh [Mon, 20 Jul 2009 12:25:44 +0000 (12:25 +0000)] 
Corrections to the comment that is inserted at the top of the amalgamation.
Ticket #3981. (CVS 6909)

FossilOrigin-Name: 7572991bc2232f57d04c972d516a3e8f85f34f14

16 years agoAlways provide a name for the TEMP database even if SQLite is compiled using
drh [Mon, 20 Jul 2009 11:32:03 +0000 (11:32 +0000)] 
Always provide a name for the TEMP database even if SQLite is compiled using
SQLITE_OMIT_TEMPDB. (CVS 6908)

FossilOrigin-Name: 0ba17c04834c0a44c8690169c0096c1d9cf325e4

16 years agoCode tweaks in support of full-coverage testing. (CVS 6907)
drh [Sat, 18 Jul 2009 20:01:37 +0000 (20:01 +0000)] 
Code tweaks in support of full-coverage testing. (CVS 6907)

FossilOrigin-Name: 22c6dbfdce965e32f3df9aec28e46e714620c362

16 years agoAdd some code to sqlite3VdbeMemSetZeroBlob() so that it works (less efficiently)...
danielk1977 [Sat, 18 Jul 2009 14:36:23 +0000 (14:36 +0000)] 
Add some code to sqlite3VdbeMemSetZeroBlob() so that it works (less efficiently) even when OMIT_INCRBLOB is defined. Ticket #3977. (CVS 6906)

FossilOrigin-Name: f5f7259d811ce8c2bf0bc64128256c4cd95f676a

16 years agoWhen the asynchronous IO backend opens a file with the EXCLUSIVE flag set, make sure...
danielk1977 [Sat, 18 Jul 2009 11:52:04 +0000 (11:52 +0000)] 
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

16 years agoChanges to test scripts so that (make test) works when OMIT_INCRBLOB is defined....
danielk1977 [Sat, 18 Jul 2009 08:30:44 +0000 (08:30 +0000)] 
Changes to test scripts so that (make test) works when OMIT_INCRBLOB is defined. (CVS 6904)

FossilOrigin-Name: 1dd834a3d61496dfa138c36676a5fa6afaa4c817

16 years agoFix a subtle problem that can occur when a transaction is automatically rolled back...
danielk1977 [Fri, 17 Jul 2009 17:25:43 +0000 (17:25 +0000)] 
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

16 years agoReturn a meaningful error message if a keyword is used as an rtree table column name...
danielk1977 [Fri, 17 Jul 2009 16:54:48 +0000 (16:54 +0000)] 
Return a meaningful error message if a keyword is used as an rtree table column name. Ticket #3970. (CVS 6902)

FossilOrigin-Name: 046efe46b50fbe928f39a0cda1b1006d486ce9f5

16 years agoSkip all tests in tableapi.test if SQLITE_OMIT_GET_TABLE defined. Ticket #3975. ...
shane [Fri, 17 Jul 2009 14:37:24 +0000 (14:37 +0000)] 
Skip all tests in tableapi.test if SQLITE_OMIT_GET_TABLE defined. Ticket #3975. (CVS 6901)

FossilOrigin-Name: 0219a543367638013ccd06295eeb9efc822e2dd1

16 years agoCode simplifications in support of structural testing. (CVS 6900)
drh [Fri, 17 Jul 2009 11:44:07 +0000 (11:44 +0000)] 
Code simplifications in support of structural testing. (CVS 6900)

FossilOrigin-Name: fb1b955dda5105025ef199880afa871e44331d65

16 years agoCode simplifications and comment improvements in support of structural
drh [Thu, 16 Jul 2009 18:21:17 +0000 (18:21 +0000)] 
Code simplifications and comment improvements in support of structural
coverage testing. (CVS 6899)

FossilOrigin-Name: 945251798144110787b197f9eb552a2dd4a25cb4

16 years agoRemove an unused variable from sqlite3ExprListDup(). Ticket #3973. (CVS 6898)
drh [Thu, 16 Jul 2009 12:41:05 +0000 (12:41 +0000)] 
Remove an unused variable from sqlite3ExprListDup().  Ticket #3973. (CVS 6898)

FossilOrigin-Name: 17c05aefd6c9e938a4cc5d3de348d8c8fdc9394d

16 years agoFix a potential database corruption following DROP TABLE when the pending
drh [Wed, 15 Jul 2009 18:15:22 +0000 (18:15 +0000)] 
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

16 years agoSimplifications to btree.c in support of structural testing. Renamed the
drh [Wed, 15 Jul 2009 17:25:45 +0000 (17:25 +0000)] 
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

16 years agoRemove an assert() from vdbeaux.c that might not be true if the database
drh [Wed, 15 Jul 2009 16:30:50 +0000 (16:30 +0000)] 
Remove an assert() from vdbeaux.c that might not be true if the database
file is corrupt. (CVS 6895)

FossilOrigin-Name: a42dc51e3bd258d5a357e557251fb2642708ceac

16 years agoAdded the SQLITE_TESTCTRL_RESERVE option to sqlite3_test_control().
drh [Wed, 15 Jul 2009 11:26:44 +0000 (11:26 +0000)] 
Added the SQLITE_TESTCTRL_RESERVE option to sqlite3_test_control().
Simplifications to btree.c to facilitate structural coverage testing. (CVS 6894)

FossilOrigin-Name: cfbeda1b3126503e9631471ce4713e25b007859f

16 years agoAdd comments and assert() statements to show that the return value from
drh [Tue, 14 Jul 2009 18:35:44 +0000 (18:35 +0000)] 
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

16 years agoSimplifications to the PRAGMA integrity_check logic. Remove unreachable code. (CVS...
drh [Tue, 14 Jul 2009 17:48:06 +0000 (17:48 +0000)] 
Simplifications to the PRAGMA integrity_check logic.  Remove unreachable code. (CVS 6892)

FossilOrigin-Name: 17749fa5480069cc4909acd992ab26d10afb279d

16 years agoSimplifications and tweaks to vdbeaux.c resulting from structural testing. (CVS 6891)
drh [Tue, 14 Jul 2009 14:15:27 +0000 (14:15 +0000)] 
Simplifications and tweaks to vdbeaux.c resulting from structural testing. (CVS 6891)

FossilOrigin-Name: fa49666fb913f0d82e84bdfa2af3a294be04e47c

16 years agoMake sure the IN operator works with zeroblobs. Ticket #3965.
drh [Tue, 14 Jul 2009 02:33:02 +0000 (02:33 +0000)] 
Make sure the IN operator works with zeroblobs. Ticket #3965.
Other simplifications associated with structural testing. (CVS 6890)

FossilOrigin-Name: 25dd342283046aaf66a679348ef1c7364c616402

16 years agoRemove the SQLITE_CommitBusy flag. This was an attempt to block recursion
drh [Mon, 13 Jul 2009 15:52:38 +0000 (15:52 +0000)] 
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

16 years agoChange an unreachable condition in btree.c to a NEVER(). (CVS 6888)
danielk1977 [Mon, 13 Jul 2009 13:18:07 +0000 (13:18 +0000)] 
Change an unreachable condition in btree.c to a NEVER(). (CVS 6888)

FossilOrigin-Name: 9f800e11391a108d7aa57f5a96d9a58711129132

16 years agoIn sqlite3PagerWrite(), do not set the PGHDR_NEED_SYNC flag on a page if an IO error...
danielk1977 [Mon, 13 Jul 2009 11:22:10 +0000 (11:22 +0000)] 
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

16 years agoRemove an assert ("assert( subpage>0 )") from btree.c that may not be true for a...
danielk1977 [Mon, 13 Jul 2009 09:41:45 +0000 (09:41 +0000)] 
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

16 years agoRemove a case from BtreeMovetoUnpacked() that is unreachable as of (6881). (CVS 6885)
danielk1977 [Mon, 13 Jul 2009 07:30:52 +0000 (07:30 +0000)] 
Remove a case from BtreeMovetoUnpacked() that is unreachable as of (6881). (CVS 6885)

FossilOrigin-Name: 39ce2097da03176e256a2ff35bb857e578f3ca2d

16 years agoSimplifications to btree.c to help facilitate coverage testing. (CVS 6884)
drh [Sun, 12 Jul 2009 02:32:21 +0000 (02:32 +0000)] 
Simplifications to btree.c to help facilitate coverage testing. (CVS 6884)

FossilOrigin-Name: dfb146ef003bae8ff216baf68cc43d7eb7855c68

16 years agoWhen an OOM fault occurs while moving a page for autovacuum in an in-memory
drh [Sun, 12 Jul 2009 02:31:36 +0000 (02:31 +0000)] 
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

16 years agoRemove an unused parameter from the accessPayload() function in btree.c. (CVS 6882)
drh [Sat, 11 Jul 2009 18:26:28 +0000 (18:26 +0000)] 
Remove an unused parameter from the accessPayload() function in btree.c. (CVS 6882)

FossilOrigin-Name: 7deb6568d89335926b77336756837c6dc3985529

16 years agoFix a case where deleting a row from a corrupt database could cause an assert to...
danielk1977 [Sat, 11 Jul 2009 17:39:42 +0000 (17:39 +0000)] 
Fix a case where deleting a row from a corrupt database could cause an assert to fail. (CVS 6881)

FossilOrigin-Name: 6994b41a94a60f6460cf9814767db321ab3851f7

16 years agoBug fix in the computation of the number of pages to autovacuum when
drh [Sat, 11 Jul 2009 17:04:08 +0000 (17:04 +0000)] 
Bug fix in the computation of the number of pages to autovacuum when
nReserve is greater than zero. (CVS 6880)

FossilOrigin-Name: 618a83d65f973183d21245721dc656a35ff594a4

16 years agoUnwind some complex conditions in sqlite3BtreeDelete() into
drh [Sat, 11 Jul 2009 13:13:11 +0000 (13:13 +0000)] 
Unwind some complex conditions in sqlite3BtreeDelete() into
separate "if" statements. (CVS 6879)

FossilOrigin-Name: d99bde9ca61eeccfe6363ff0882fd4bcdb9a34dc

16 years agoRemove another unreachable branch from btree.c. (CVS 6878)
danielk1977 [Sat, 11 Jul 2009 11:45:23 +0000 (11:45 +0000)] 
Remove another unreachable branch from btree.c. (CVS 6878)

FossilOrigin-Name: b0853100a9f8e185e8d027502822337a79a2ba0c

16 years agoModify the integrity-check code so that each b-tree page inspected is reinitialized...
danielk1977 [Sat, 11 Jul 2009 06:55:33 +0000 (06:55 +0000)] 
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

16 years agoRemove unreachable condition from btree.c. (CVS 6876)
danielk1977 [Sat, 11 Jul 2009 05:06:51 +0000 (05:06 +0000)] 
Remove unreachable condition from btree.c. (CVS 6876)

FossilOrigin-Name: 47b40fefa67f7c563ce2004509aaf8e203038be4

16 years agoFix a pager reference count leak in btree that occurs on an OOM following
drh [Fri, 10 Jul 2009 16:51:30 +0000 (16:51 +0000)] 
Fix a pager reference count leak in btree that occurs on an OOM following
a database page size change. (CVS 6875)

FossilOrigin-Name: c6dfc8bd3911b4c93969bfc13d9931965feed674

16 years agoFix a double-free that can occur when using the fts3 legacy syntax '-' operator....
danielk1977 [Fri, 10 Jul 2009 09:24:43 +0000 (09:24 +0000)] 
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

16 years agoSimplifications to the PRAGMA integrity_check logic in btree.c. (CVS 6873)
drh [Fri, 10 Jul 2009 02:52:20 +0000 (02:52 +0000)] 
Simplifications to the PRAGMA integrity_check logic in btree.c. (CVS 6873)

FossilOrigin-Name: 440c573c7e2a22f9a67a9571883e205fbadb7c11

16 years agoFix two faulty assert() statements btree. (It was possible for the assertions
drh [Thu, 9 Jul 2009 13:25:32 +0000 (13:25 +0000)] 
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

16 years agoRemove an unused branch from btree.c. (CVS 6871)
danielk1977 [Thu, 9 Jul 2009 11:36:01 +0000 (11:36 +0000)] 
Remove an unused branch from btree.c. (CVS 6871)

FossilOrigin-Name: 45efb78a8a1e01a0154153b10469bb34d6d129eb

16 years agoIn btree.c, have setSharedCacheLock() assume that the b-tree is sharable instead...
danielk1977 [Thu, 9 Jul 2009 08:27:14 +0000 (08:27 +0000)] 
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

16 years agoRestore (btree_set_cache_size) to test3.c. This is used on unix for the tcl "crash...
danielk1977 [Thu, 9 Jul 2009 05:07:37 +0000 (05:07 +0000)] 
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

16 years agoremoved the test function sqlite3BtreeFlags() (test code only); (CVS 6868)
shane [Thu, 9 Jul 2009 03:20:46 +0000 (03:20 +0000)] 
removed the test function sqlite3BtreeFlags() (test code only); (CVS 6868)

FossilOrigin-Name: 579ba6c83f52d26860e5152f06355aa4f49e568d

16 years agoremoved unused functions from test3.c (test code only); (CVS 6867)
shane [Thu, 9 Jul 2009 02:48:23 +0000 (02:48 +0000)] 
removed unused functions from test3.c (test code only); (CVS 6867)

FossilOrigin-Name: 0eb69e8dda13e2d52a06f66a71480f59fd766271

16 years agoSimplifications and additional testcase() macros for btree.c. (CVS 6866)
drh [Thu, 9 Jul 2009 02:24:35 +0000 (02:24 +0000)] 
Simplifications and additional testcase() macros for btree.c. (CVS 6866)

FossilOrigin-Name: 1b8c3a8246a5d8b8f5607014f68483735a403249

16 years agoFix a typo in (6861): "ifndef SQLITE_TEST" -> "ifdef SQLITE_TEST". (CVS 6865)
danielk1977 [Wed, 8 Jul 2009 18:50:55 +0000 (18:50 +0000)] 
Fix a typo in (6861): "ifndef SQLITE_TEST" -> "ifdef SQLITE_TEST". (CVS 6865)

FossilOrigin-Name: 890dbab28c3a1af4a1e01221318c9200574139e7

16 years agoRevert part of (6860) that was accidentally checked in. (CVS 6864)
danielk1977 [Wed, 8 Jul 2009 18:45:37 +0000 (18:45 +0000)] 
Revert part of (6860) that was accidentally checked in. (CVS 6864)

FossilOrigin-Name: 11e295ccd28fe669ee74c846db507040895a5e5b

16 years agoAdd another boundary-condition testcase() macro to btree.c. Correct the
drh [Wed, 8 Jul 2009 18:12:49 +0000 (18:12 +0000)] 
Add another boundary-condition testcase() macro to btree.c.  Correct the
comment on modifyPagePointer(). (CVS 6863)

FossilOrigin-Name: fed66e8695ee552d5ca05ac91485cfc5940e7496

16 years agoImprovements to comments in btree.c:freeSpace(). Added a testcase() macro
drh [Wed, 8 Jul 2009 16:54:40 +0000 (16:54 +0000)] 
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

16 years agoComment out sqlite3BtreeFlags() when not in debug mode. Tweaks to
drh [Wed, 8 Jul 2009 15:14:50 +0000 (15:14 +0000)] 
Comment out sqlite3BtreeFlags() when not in debug mode.  Tweaks to
database corruption detection logic in freeSpace(). (CVS 6861)

FossilOrigin-Name: 196cbf82290a308e78b13044d0fae993f2d5cb90

16 years agoFix error handling in sqlite3BtreePutData(). (CVS 6860)
danielk1977 [Wed, 8 Jul 2009 13:55:28 +0000 (13:55 +0000)] 
Fix error handling in sqlite3BtreePutData(). (CVS 6860)

FossilOrigin-Name: 86eba4f16fd9e97344ab6dfb9cb9a85cf14751dd

16 years agoRemove an ALWAYS clause that could be false if an IO error within a statement execute...
danielk1977 [Wed, 8 Jul 2009 08:05:35 +0000 (08:05 +0000)] 
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

16 years agoSimplifications to sqlite3BtreeInsert() and allocateSpace(). Added many
drh [Wed, 8 Jul 2009 01:49:11 +0000 (01:49 +0000)] 
Simplifications to sqlite3BtreeInsert() and allocateSpace().  Added many
testcase() macros to verify boundary conditions in btree.c. (CVS 6858)

FossilOrigin-Name: aab82a229a984bdd37bda2d140cf4279ab54a741

16 years agoImprovements to corrupt database detection in defragmentPage(). (CVS 6857)
drh [Tue, 7 Jul 2009 17:38:38 +0000 (17:38 +0000)] 
Improvements to corrupt database detection in defragmentPage(). (CVS 6857)

FossilOrigin-Name: 87bbc8d6b68c089c8211c35c11c2f6ac4e46271c

16 years agoDo not load the root-page of a b-tree table/index when opening a cursor. Instead...
danielk1977 [Tue, 7 Jul 2009 15:47:12 +0000 (15:47 +0000)] 
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

16 years agoIf an error occurs in PagerBegin(), call pager_end_transaction() to reset the interna...
danielk1977 [Tue, 7 Jul 2009 13:56:24 +0000 (13:56 +0000)] 
If an error occurs in PagerBegin(), call pager_end_transaction() to reset the internal state of the pager object. (CVS 6855)

FossilOrigin-Name: ea7ed16628da29cf4a127a25cbac8ae553e2ac1f

16 years agoFix a reference count problem following database corruption detection in
drh [Tue, 7 Jul 2009 11:39:58 +0000 (11:39 +0000)] 
Fix a reference count problem following database corruption detection in
the ptrmapPut() routine of btree.c. (CVS 6854)

FossilOrigin-Name: ec1e27e33b89e809a03e4140b351f6c8674c0233

16 years agoSimplifications to btree.c and vdbeaux.c in support of structural coverage
drh [Tue, 7 Jul 2009 02:44:07 +0000 (02:44 +0000)] 
Simplifications to btree.c and vdbeaux.c in support of structural coverage
testing. (CVS 6853)

FossilOrigin-Name: fc2a40a9db23285da16f40f5131613907fb80f02

16 years agoFix the pager so that it remembers the name of the journal for an in-memory
drh [Mon, 6 Jul 2009 21:54:40 +0000 (21:54 +0000)] 
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

16 years agoFix the backup logic so that it detects a failure to sqlite3BtreeUpdateMeta()
drh [Mon, 6 Jul 2009 19:03:12 +0000 (19:03 +0000)] 
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

16 years agoMake the sqlite3BtreeMoveto function static, since it is only used from within btree...
danielk1977 [Mon, 6 Jul 2009 18:56:13 +0000 (18:56 +0000)] 
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

16 years agoSimplifications and comment cleanup in vdbeaux.c. (CVS 6849)
drh [Mon, 6 Jul 2009 00:44:08 +0000 (00:44 +0000)] 
Simplifications and comment cleanup in vdbeaux.c. (CVS 6849)

FossilOrigin-Name: 1636e7831a21d401a48aa74d884444a287f14f72

16 years agoRemove unreachable code from function btreeCursor() in btree.c. (CVS 6848)
danielk1977 [Sat, 4 Jul 2009 17:16:00 +0000 (17:16 +0000)] 
Remove unreachable code from function btreeCursor() in btree.c. (CVS 6848)

FossilOrigin-Name: c76a366ed4dc63604ff695b3ee9c183e430a367e

16 years agoRemove a redundant branch from btree.c. (CVS 6847)
danielk1977 [Sat, 4 Jul 2009 15:41:02 +0000 (15:41 +0000)] 
Remove a redundant branch from btree.c. (CVS 6847)

FossilOrigin-Name: 133357d2f070ba303deddff59beead1ec8d10521

16 years agoRemove two unused fields from the Parse structure. The TCL interface now
drh [Fri, 3 Jul 2009 22:54:36 +0000 (22:54 +0000)] 
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

16 years agoRemove unused code (that was commented out) from prepare.c. Remove an
drh [Fri, 3 Jul 2009 19:19:50 +0000 (19:19 +0000)] 
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

16 years agoCause sqlite3_exec() to return SQLITE_NOMEM if it cannot allocate memory to
drh [Fri, 3 Jul 2009 19:18:43 +0000 (19:18 +0000)] 
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

16 years agoRemove an unused variable from the test code in test3.c. (CVS 6843)
drh [Fri, 3 Jul 2009 17:23:48 +0000 (17:23 +0000)] 
Remove an unused variable from the test code in test3.c. (CVS 6843)

FossilOrigin-Name: 9e35bec9ef924ec44e87294a549238e0104bb27b

16 years agoAdd a version of the Lemon parser template "lempar.c" to the src/ subfolder.
drh [Fri, 3 Jul 2009 17:09:28 +0000 (17:09 +0000)] 
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

16 years agoSimplify the way the read-uncommitted flag is handled to facilitate test coverage...
danielk1977 [Fri, 3 Jul 2009 16:25:06 +0000 (16:25 +0000)] 
Simplify the way the read-uncommitted flag is handled to facilitate test coverage. (CVS 6841)

FossilOrigin-Name: e2112d6160a82ccd4b6a1c798d2064d0f1b086eb

16 years agoMake explicit the restrictions on UPDATE, DELETE, and INSERT statement syntax
drh [Fri, 3 Jul 2009 15:37:27 +0000 (15:37 +0000)] 
Make explicit the restrictions on UPDATE, DELETE, and INSERT statement syntax
within triggers.  Ticket #3947. (CVS 6840)

FossilOrigin-Name: c8bf40df7be728b11bb633516d1988c6064a9d70

16 years agoTest the result of pthread_create() and do not call pthread_join() if the
drh [Fri, 3 Jul 2009 12:57:58 +0000 (12:57 +0000)] 
Test the result of pthread_create() and do not call pthread_join() if the
thread creation failed.  Ticket #3933. (CVS 6839)

FossilOrigin-Name: 304c5110ad958b2cc1ddff30e68c8791109128b5

16 years agoFix to sqlite3AuthRead to accommodate "new" or "old" references that are used in...
danielk1977 [Thu, 2 Jul 2009 18:40:34 +0000 (18:40 +0000)] 
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

16 years agoWhen a b-tree transaction is committed when there are open cursors, downgrade shared...
danielk1977 [Thu, 2 Jul 2009 17:21:57 +0000 (17:21 +0000)] 
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

16 years agoCause opening a transaction on a sharable b-tree module automatically obtain a read...
danielk1977 [Thu, 2 Jul 2009 07:47:33 +0000 (07:47 +0000)] 
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

16 years agoFix for compilation with OMIT_AUTOVACUUM defined. Ticket #3940. (CVS 6835)
danielk1977 [Thu, 2 Jul 2009 05:23:25 +0000 (05:23 +0000)] 
Fix for compilation with OMIT_AUTOVACUUM defined. Ticket #3940. (CVS 6835)

FossilOrigin-Name: 8f0591ae98c2125a4922933496f4412aee8ab86e

16 years agoChange to test code and scripts allowing memsys3 to be tested using a build that...
danielk1977 [Wed, 1 Jul 2009 18:09:01 +0000 (18:09 +0000)] 
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

16 years agoFix a 1-byte buffer overwrite that can occur when a virtual table overloads an SQL...
danielk1977 [Wed, 1 Jul 2009 18:04:20 +0000 (18:04 +0000)] 
Fix a 1-byte buffer overwrite that can occur when a virtual table overloads an SQL function. (CVS 6833)

FossilOrigin-Name: bfe336a8993e06e70d3c32a929202fb015dcbb89

16 years agoReport an error if a USING or ON clause is specified following a from-list element...
danielk1977 [Wed, 1 Jul 2009 16:12:07 +0000 (16:12 +0000)] 
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

16 years agoDo not ignore alias "a" in a query of the form "SELECT ... FROM (...) AS a" Fix for...
danielk1977 [Wed, 1 Jul 2009 14:56:39 +0000 (14:56 +0000)] 
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

16 years agoCause incremental-blob read/write operations lock shared-cache tables in the same...
danielk1977 [Mon, 29 Jun 2009 06:00:37 +0000 (06:00 +0000)] 
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