]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
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

16 years agoVersion 3.6.16 (CVS 6829)
drh [Sat, 27 Jun 2009 14:10:30 +0000 (14:10 +0000)] 
Version 3.6.16 (CVS 6829)

FossilOrigin-Name: ff691a6b2a302fe7978459cb8df9d56184892ee0

16 years agoFix an instance where sqlite3JumpHere() might be called with a negative
drh [Sat, 27 Jun 2009 11:17:35 +0000 (11:17 +0000)] 
Fix an instance where sqlite3JumpHere() might be called with a negative
address following an OOM fault. (CVS 6828)

FossilOrigin-Name: 49f22e55d69d0b5a34400b36332a2eb861362eb2

16 years agoFix a bug in sqlite3_realloc() - if called with a size of more than
drh [Sat, 27 Jun 2009 00:48:33 +0000 (00:48 +0000)] 
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

16 years agoRemove incorrect NEVER() macros from malloc.c. The allocations can be
drh [Fri, 26 Jun 2009 18:35:16 +0000 (18:35 +0000)] 
Remove incorrect NEVER() macros from malloc.c.  The allocations can be
exceeded using sqlite3_malloc() and sqlite3_realloc(). (CVS 6826)

FossilOrigin-Name: 0d345e5923ff92a87195f6c04a29a56bf67ee43c

16 years agoRemoved a few compiler warnings under MSVC. (CVS 6825)
shane [Fri, 26 Jun 2009 16:32:13 +0000 (16:32 +0000)] 
Removed a few compiler warnings under MSVC. (CVS 6825)

FossilOrigin-Name: f01a9fc375d77c67602a9f6be6a674beb516233f

16 years agoRemove the priorNewRowid field from the sqlite3 structure. Use the
drh [Fri, 26 Jun 2009 15:14:55 +0000 (15:14 +0000)] 
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

16 years agoSkip a couple tests requiring working 64bit int support on platforms without that...
shane [Fri, 26 Jun 2009 14:17:47 +0000 (14:17 +0000)] 
Skip a couple tests requiring working 64bit int support on platforms without that support.  Test code change only. (CVS 6823)

FossilOrigin-Name: d8c8145c9d28d014eb9218b3f1312b957ccc72b7

16 years agoWhen sqlite3VdbeAddOp() fails due to an OOM fault, return an address of 1
drh [Fri, 26 Jun 2009 14:04:51 +0000 (14:04 +0000)] 
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

16 years agoFix a test script problem in exclusive.test. (CVS 6821)
danielk1977 [Fri, 26 Jun 2009 12:30:39 +0000 (12:30 +0000)] 
Fix a test script problem in exclusive.test. (CVS 6821)

FossilOrigin-Name: a52ef5a4216f26c617bd1471cd19f3da2a6d2c4c

16 years agoFix the new pager.c changes so that they compile with IOTRACE defined.
drh [Fri, 26 Jun 2009 12:15:22 +0000 (12:15 +0000)] 
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

16 years agoAnother change to test_journal.c to account for (6817). Again, only test code has...
danielk1977 [Fri, 26 Jun 2009 10:39:36 +0000 (10:39 +0000)] 
Another change to test_journal.c to account for (6817). Again, only test code has changed. (CVS 6819)

FossilOrigin-Name: 58884b6c50f927c5606d857b2865d788a5147060

16 years agoUpdate test_journal.c to account for (6817). Changes to test code only. (CVS 6818)
danielk1977 [Fri, 26 Jun 2009 09:01:28 +0000 (09:01 +0000)] 
Update test_journal.c to account for (6817). Changes to test code only. (CVS 6818)

FossilOrigin-Name: 542ee8cced2a37095808d8baf5002dc66f4a64d6

16 years agoAvoid writing the 8-byte journal-header magic until the journal-header is synced...
danielk1977 [Fri, 26 Jun 2009 07:12:06 +0000 (07:12 +0000)] 
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

16 years agoFix a problem with a return code being ignored in insertCell(). (CVS 6816)
danielk1977 [Thu, 25 Jun 2009 16:11:05 +0000 (16:11 +0000)] 
Fix a problem with a return code being ignored in insertCell(). (CVS 6816)

FossilOrigin-Name: bb5f1c01435dcc1ea056f0d149f750fa7812f652

16 years agoGet the notify2.test running again by removing an ALWAYS() that was mistakenly
drh [Thu, 25 Jun 2009 11:50:21 +0000 (11:50 +0000)] 
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

16 years agoReplace an "if" condition that is always true in btree.c with an assert(). (CVS 6814)
danielk1977 [Thu, 25 Jun 2009 09:40:03 +0000 (09:40 +0000)] 
Replace an "if" condition that is always true in btree.c with an assert(). (CVS 6814)

FossilOrigin-Name: daadbd9a8f0e35dd16c715cf2e9f99f52afa30dd

16 years agoImproved handling of oversize string and blob errors. Other simplifications
drh [Thu, 25 Jun 2009 01:47:11 +0000 (01:47 +0000)] 
Improved handling of oversize string and blob errors.  Other simplifications
in support of full coverage testing. (CVS 6813)

FossilOrigin-Name: 8b34076668f0f712de0fbbe9bc2e68d42797e1b2

16 years agoRemove an ALWAYS() macro from vdbe.c that sometimes fails on thread tests. (CVS 6812)
drh [Wed, 24 Jun 2009 13:16:03 +0000 (13:16 +0000)] 
Remove an ALWAYS() macro from vdbe.c that sometimes fails on thread tests. (CVS 6812)

FossilOrigin-Name: 52eac078c7080519911599e19819cbec475de6d6

16 years agoDisable the new malloc-37 test when locking_mode==exclusive. The test
drh [Wed, 24 Jun 2009 13:13:45 +0000 (13:13 +0000)] 
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

16 years agoRemove a declaration of the sqlite3Assert() function that was deleted by the
drh [Wed, 24 Jun 2009 11:08:13 +0000 (11:08 +0000)] 
Remove a declaration of the sqlite3Assert() function that was deleted by the
previous check-in. (CVS 6810)

FossilOrigin-Name: ee20b6a23fa4a4ec4d3a2d0dcfcabff466f08246

16 years agoRemove the sqlite3Assert() function. The ALWAYS() and NEVER() macros call
drh [Wed, 24 Jun 2009 10:26:32 +0000 (10:26 +0000)] 
Remove the sqlite3Assert() function.  The ALWAYS() and NEVER() macros call
assert() directly when compiled with SQLITE_DEBUG. (CVS 6809)

FossilOrigin-Name: d8fc373fef22311e1c6b5bce6d3e601217a69940

16 years agoSimplify things by rolling the functionality of balance_shallower() into balance_nonr...
danielk1977 [Wed, 24 Jun 2009 05:40:34 +0000 (05:40 +0000)] 
Simplify things by rolling the functionality of balance_shallower() into balance_nonroot(). (CVS 6808)

FossilOrigin-Name: 11750c6aee6aa05b2627ad9dfb2fbcdfe8944168

16 years agoEnhance autoincrement so that it works with triggers that also do
drh [Tue, 23 Jun 2009 20:28:53 +0000 (20:28 +0000)] 
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

16 years agoRemove a condition from balance_nonroot() that is always true. (CVS 6806)
danielk1977 [Tue, 23 Jun 2009 16:40:17 +0000 (16:40 +0000)] 
Remove a condition from balance_nonroot() that is always true. (CVS 6806)

FossilOrigin-Name: c5dc80e6bdd18a5ada728c8d5c9403ac233f1c9a

16 years agoCall balance_shallower() from balance_nonroot() instead of from balance(). This simpl...
danielk1977 [Tue, 23 Jun 2009 15:43:39 +0000 (15:43 +0000)] 
Call balance_shallower() from balance_nonroot() instead of from balance(). This simplifies coverage testing a bit. (CVS 6805)

FossilOrigin-Name: da9893e23caf89090c8b6563cb5f88d7dbf7c260

16 years agoUpdate the configure script for version 3.6.16 (CVS 6804)
drh [Tue, 23 Jun 2009 14:39:52 +0000 (14:39 +0000)] 
Update the configure script for version 3.6.16 (CVS 6804)

FossilOrigin-Name: b614e554f7ebaef9cb1718b617e020e532568bbb

16 years agoUpdate the version number in preparation for the next release. (CVS 6803)
drh [Tue, 23 Jun 2009 14:18:15 +0000 (14:18 +0000)] 
Update the version number in preparation for the next release. (CVS 6803)

FossilOrigin-Name: 207c4a02ba4dd950948367c91b4a73209d62da41

16 years agoSimplifications to vdbe.c to promote better test coverage. (CVS 6802)
drh [Tue, 23 Jun 2009 14:15:04 +0000 (14:15 +0000)] 
Simplifications to vdbe.c to promote better test coverage. (CVS 6802)

FossilOrigin-Name: 3ffc93d762b64fd84f47c4b6d68ab56b69ea98a9

16 years agoAdd a test to verify that #3929 is fixed. (CVS 6801)
danielk1977 [Tue, 23 Jun 2009 11:53:09 +0000 (11:53 +0000)] 
Add a test to verify that #3929 is fixed. (CVS 6801)

FossilOrigin-Name: 16c1ae9bde895d39c4eaababbd1dbf9e3b9cb653

16 years agoFix a failing assert in btree.c. The same bug was causing a spurious SQLITE_CORRUPT...
danielk1977 [Tue, 23 Jun 2009 11:22:29 +0000 (11:22 +0000)] 
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

16 years agoSimplifications to vdbe.c and it service routines in support of coverage
drh [Mon, 22 Jun 2009 19:05:40 +0000 (19:05 +0000)] 
Simplifications to vdbe.c and it service routines in support of coverage
testing. (CVS 6799)

FossilOrigin-Name: 308f2e61520ac7440700d93ca5bab4a844f2dc17

16 years agoRemove a condition that is always true from btree.c. (CVS 6798)
danielk1977 [Mon, 22 Jun 2009 18:03:51 +0000 (18:03 +0000)] 
Remove a condition that is always true from btree.c. (CVS 6798)

FossilOrigin-Name: 3ec8b37a89fdb2436d312439715414fae2cd20a8

16 years agoMake sure sqlite3BtreeCreateTable() returns an error code if the largest
drh [Mon, 22 Jun 2009 12:05:10 +0000 (12:05 +0000)] 
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

16 years agoMore simplifications to vdbe.c. Remove a NEVER() from vdbe.c that is possible
drh [Mon, 22 Jun 2009 11:10:47 +0000 (11:10 +0000)] 
More simplifications to vdbe.c.  Remove a NEVER() from vdbe.c that is possible
after all. (CVS 6796)

FossilOrigin-Name: c8f009bd24cb4e4b5ce9fbfd8ab09921f19d41af

16 years agoIf an OOM error occurs just after obtaining a shared lock on the database file, relea...
danielk1977 [Mon, 22 Jun 2009 05:43:24 +0000 (05:43 +0000)] 
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

16 years agoSimplifications to vdbe.c in support of coverage testing. (CVS 6794)
drh [Mon, 22 Jun 2009 00:55:30 +0000 (00:55 +0000)] 
Simplifications to vdbe.c in support of coverage testing. (CVS 6794)

FossilOrigin-Name: 16680f05bd169dfb1b4bf0eb082e69701f9b07ab

16 years agoWhen recovering from the error-state in pagerSharedLock(), do not search for a hot...
danielk1977 [Sat, 20 Jun 2009 18:52:49 +0000 (18:52 +0000)] 
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

16 years agoIf after obtaining an exclusive lock to rollback a hot-journal file it is found that...
danielk1977 [Sat, 20 Jun 2009 11:54:39 +0000 (11:54 +0000)] 
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

16 years agoImproved documentation on the VFS methods. Ticket #3925. (CVS 6791)
drh [Fri, 19 Jun 2009 22:50:31 +0000 (22:50 +0000)] 
Improved documentation on the VFS methods.  Ticket #3925. (CVS 6791)

FossilOrigin-Name: f66fc7713ec5ff8cf92e875e904f079d724b0477

16 years agoDo now allow a COMMIT to occur while even a single write operating is
drh [Fri, 19 Jun 2009 22:23:41 +0000 (22:23 +0000)] 
Do now allow a COMMIT to occur while even a single write operating is
in progress. (CVS 6790)

FossilOrigin-Name: 605520ec04061e389226fbec59f7aedf674b3c4e

16 years agoFix the comment on the sqlite3PExpr() subroutine. Ticket #3924. (CVS 6789)
drh [Fri, 19 Jun 2009 18:32:54 +0000 (18:32 +0000)] 
Fix the comment on the sqlite3PExpr() subroutine.  Ticket #3924. (CVS 6789)

FossilOrigin-Name: 4bb96db6b4d2cfa71430a2646c1082a494e3519f

16 years agoIf a call is made to sqlite3PagerAcquire when there are no outstanding references...
danielk1977 [Fri, 19 Jun 2009 17:50:01 +0000 (17:50 +0000)] 
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

16 years agoMake sure group_concat() ignores initial NULL values. (CVS 6787)
drh [Fri, 19 Jun 2009 16:44:41 +0000 (16:44 +0000)] 
Make sure group_concat() ignores initial NULL values. (CVS 6787)

FossilOrigin-Name: 90c3b23ccac8a9e7fc1cc831e43888e4e43badc9

16 years agoReorganize and cleanup the prepared statement object. Remove code that has
drh [Fri, 19 Jun 2009 14:06:03 +0000 (14:06 +0000)] 
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

16 years agoFix a possible segfault when backing up an encrypted database. (CVS 6785)
drh [Fri, 19 Jun 2009 02:25:48 +0000 (02:25 +0000)] 
Fix a possible segfault when backing up an encrypted database. (CVS 6785)

FossilOrigin-Name: 7d8f178c8145b90da31f6557f7cd99d154eb676e

16 years agoMake sure the sqlite3VdbeGetOp() subroutine works even when SQLite is
drh [Fri, 19 Jun 2009 00:33:31 +0000 (00:33 +0000)] 
Make sure the sqlite3VdbeGetOp() subroutine works even when SQLite is
compiled with SQLITE_OMIT_TRACE. (CVS 6784)

FossilOrigin-Name: 1c8ec2a6e4efbb3fdc58f999b7b725fa5dc4d0e9

16 years agoChanges to the backup functionality so that it works better with codecs. (CVS 6783)
drh [Thu, 18 Jun 2009 20:52:47 +0000 (20:52 +0000)] 
Changes to the backup functionality so that it works better with codecs. (CVS 6783)

FossilOrigin-Name: 87d6796d986e4d5238252e704d936ab4407a0265

16 years agoMove codec management from database connections into the pager so that it
drh [Thu, 18 Jun 2009 17:22:39 +0000 (17:22 +0000)] 
Move codec management from database connections into the pager so that it
will work together with shared cache. (CVS 6782)

FossilOrigin-Name: ed08b53cd64c4ff2c94ef4e48441c5236041c9ca

16 years agoUpdate the filefmt.test test script to conform to the previous check-in. (CVS 6781)
drh [Thu, 18 Jun 2009 11:34:42 +0000 (11:34 +0000)] 
Update the filefmt.test test script to conform to the previous check-in. (CVS 6781)

FossilOrigin-Name: 40a40e81b3ad80114422d6a48146e5fb27e2551d

16 years agoReduce the minimum usable page space to 480 byte from 500 bytes. (CVS 6780)
drh [Thu, 18 Jun 2009 11:29:20 +0000 (11:29 +0000)] 
Reduce the minimum usable page space to 480 byte from 500 bytes. (CVS 6780)

FossilOrigin-Name: db4fb835363c9c7e38c891e01188a6e2db88472d

16 years agoRemove the P3 operand from OP_IsNull since it was not being used. (CVS 6779)
drh [Thu, 18 Jun 2009 00:41:55 +0000 (00:41 +0000)] 
Remove the P3 operand from OP_IsNull since it was not being used. (CVS 6779)

FossilOrigin-Name: 767ef1e4a1b31abef479368d9f960ecfd6fa08c6

16 years agoAvoid an assertion fault if an out-of-memory error occurs while trying
drh [Wed, 17 Jun 2009 22:50:41 +0000 (22:50 +0000)] 
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

16 years agoFix a problem in vdbe.c that could cause a double-free of memory if the
drh [Wed, 17 Jun 2009 21:42:33 +0000 (21:42 +0000)] 
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

16 years agoUse caution to avoid integer overflow when doing real to integer affinity
drh [Wed, 17 Jun 2009 16:20:04 +0000 (16:20 +0000)] 
Use caution to avoid integer overflow when doing real to integer affinity
operations.  Ticket #3922. (CVS 6776)

FossilOrigin-Name: 392559465d499f491907ef7f42d37a1a6c699511

16 years agoFix a potential segfault following database corruption. Problem
drh [Wed, 17 Jun 2009 13:57:16 +0000 (13:57 +0000)] 
Fix a potential segfault following database corruption.  Problem
made visible by check-in (6772). (CVS 6775)

FossilOrigin-Name: 69eb0ff817cff6266c53b79047bcff5e5d54b618

16 years agoSuppress some -Wextra compiler warnings from GCC. (CVS 6774)
drh [Wed, 17 Jun 2009 13:09:38 +0000 (13:09 +0000)] 
Suppress some -Wextra compiler warnings from GCC. (CVS 6774)

FossilOrigin-Name: 59ec937ce226bbf6c48c5e0466d3bab48873c9ea

16 years agoFix a bug affecting secure-delete mode introduced by (6768). (CVS 6773)
danielk1977 [Wed, 17 Jun 2009 11:49:52 +0000 (11:49 +0000)] 
Fix a bug affecting secure-delete mode introduced by (6768). (CVS 6773)

FossilOrigin-Name: a433ca821c134caeac0fa16416eb95c647416b95

16 years agoFix for #3918. Also, fix the TRACE macros in balance_nonroot(). (CVS 6772)
danielk1977 [Wed, 17 Jun 2009 11:13:28 +0000 (11:13 +0000)] 
Fix for #3918. Also, fix the TRACE macros in balance_nonroot(). (CVS 6772)

FossilOrigin-Name: 368e44ec2e648b04f3b817f82586ccd864e60c89

16 years agoA minor simplification to the tokenizer. (CVS 6771)
drh [Wed, 17 Jun 2009 01:17:13 +0000 (01:17 +0000)] 
A minor simplification to the tokenizer. (CVS 6771)

FossilOrigin-Name: 18f2076ac21dd0ab343a79461837f5591f9d4d87

16 years agoChanges to prepare.c and callback.c to promote better test coverage. (CVS 6770)
drh [Wed, 17 Jun 2009 00:35:30 +0000 (00:35 +0000)] 
Changes to prepare.c and callback.c to promote better test coverage. (CVS 6770)

FossilOrigin-Name: 08cca219f16efab93cb00f04d2e2f8033893e5f1

16 years agoChanges sqlite3_prepare_v2() (and related routines) so that if it fails due
drh [Tue, 16 Jun 2009 17:49:36 +0000 (17:49 +0000)] 
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

16 years agoChanges to balance_nonroot() and BtreeDelete() to simplify delete operations and...
danielk1977 [Tue, 16 Jun 2009 16:50:22 +0000 (16:50 +0000)] 
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

16 years agoFix a link error and warning that can occur in where.c when compiling under MSVC...
shane [Tue, 16 Jun 2009 14:15:22 +0000 (14:15 +0000)] 
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

16 years agoLeave out a redundant line in build.c. Ticket #3916. (CVS 6766)
danielk1977 [Tue, 16 Jun 2009 04:35:39 +0000 (04:35 +0000)] 
Leave out a redundant line in build.c. Ticket #3916. (CVS 6766)

FossilOrigin-Name: d9f997aeb7a2195d0e16fe1555626918902b4f91

16 years agoRemove a duplicate assert from btree.c. Ticket #3915. (CVS 6765)
danielk1977 [Tue, 16 Jun 2009 04:31:49 +0000 (04:31 +0000)] 
Remove a duplicate assert from btree.c. Ticket #3915. (CVS 6765)

FossilOrigin-Name: d89542cd8b2efaea7c6be6cd7787d183c55ae36a

16 years agoAdditional updates to the symbol resolver and expression tree walker to
drh [Mon, 15 Jun 2009 23:15:59 +0000 (23:15 +0000)] 
Additional updates to the symbol resolver and expression tree walker to
facilitate test coverage. (CVS 6764)

FossilOrigin-Name: a49c2d4befcc33dd98543fe7b4d4f0bae56f1a90

16 years agoChanges to allow a clean compile with no floating-point instructions
drh [Mon, 15 Jun 2009 20:45:34 +0000 (20:45 +0000)] 
Changes to allow a clean compile with no floating-point instructions
generated when SQLITE_OMIT_FLOATING_POINT is used. (CVS 6763)

FossilOrigin-Name: 1591b8322babebc45df3b799cc5e457288f28594