Commit Graph

6869 Commits

Author SHA1 Message Date
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