drh [Thu, 29 Oct 2009 18:38:21 +0000 (18:38 +0000)]
Fix a 16-bit integer overflow that might occur in statements that use both
an EXISTS clause and IN operator with a RHS holding in excess of 32K entries.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
drh [Fri, 12 Jun 2009 17:46:19 +0000 (17:46 +0000)]
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)
drh [Fri, 12 Jun 2009 13:53:51 +0000 (13:53 +0000)]
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)
drh [Wed, 10 Jun 2009 19:33:28 +0000 (19:33 +0000)]
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)
drh [Tue, 9 Jun 2009 19:53:58 +0000 (19:53 +0000)]
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)
drh [Tue, 9 Jun 2009 13:42:24 +0000 (13:42 +0000)]
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)
danielk1977 [Tue, 9 Jun 2009 11:34:10 +0000 (11:34 +0000)]
Avoid calling fillInCell() to create an internal node intkey cell from balance_nonroot(). A single putVarint() does the same thing more quickly. (CVS 6734)
danielk1977 [Tue, 9 Jun 2009 09:41:00 +0000 (09:41 +0000)]
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)