drh [Fri, 6 May 2016 16:49:54 +0000 (16:49 +0000)]
For DELETE operations, make sure that seeks on the main table are not
deferred, since if they are and none of the indexes reference columns of
the table, the seek might never occur until the OP_Delete opcode, which is
too late. Fix for ticket [16c9801ceba49].
drh [Fri, 6 May 2016 16:06:59 +0000 (16:06 +0000)]
In the WHERE generator, when building code for a DELETE operation, make sure
that seeks to the main table are not deferred.
This is a better fix for the [16c9801ceba49] bug than the previous.
drh [Fri, 6 May 2016 11:31:10 +0000 (11:31 +0000)]
Do not scan indexes that have the integer primary key as their left-most
column. This fixes the crash of ticket [16c9801ceba] but it seems like
the wrong fix. More investigation needed.
drh [Wed, 4 May 2016 14:45:30 +0000 (14:45 +0000)]
Only disable the one-pass DELETE optimization if the WHERE clause contains
a correlated subquery. Uncorrelated subqueries are allowed. This is a
refinement of check-in [3f221f592a9a1] that is the fix for
ticket [dc6ebeda9396087].
dan [Wed, 4 May 2016 11:28:03 +0000 (11:28 +0000)]
Disable the PagerDontWrite() optimization for temp tables. It can cause database corruption if a page passed to PagerDontWrite() is dirty at the start of a transaction that is subsequently rolled back.
drh [Tue, 3 May 2016 14:57:07 +0000 (14:57 +0000)]
The session extension is disabled by default. To enable it using
--enable-session on ./configure on unix and add SESSION=1 to the nmake
on Windows. Or add -DSQLITE_ENABLE_SESSION and
-DSQLITE_ENABLE_PREUPDATE_HOOK to build manually.
drh [Mon, 2 May 2016 16:59:49 +0000 (16:59 +0000)]
Fix a test case in temptable2.test so that it works on systems that
lack a coherient cache (ex: OpenBSD) and thus do not support the
"PRAGMA mmap_size" command.
dan [Sat, 30 Apr 2016 19:23:10 +0000 (19:23 +0000)]
Change the way tester.tcl handes $argv so that in "permutations.test <permutation> <filename>" <filename> may be the name of any file in the test/ directory.
Fix the temporary directory search algorithm for unix so that it fails
gracefully even if all candidate directories are inaccessible. This fixes
a bug that was introduced by check-in [9b8fec60d8e].
dan [Fri, 29 Apr 2016 11:33:58 +0000 (11:33 +0000)]
Modify the permutations.test script so as to set any permutation specific configuration values before running each individual test script. Fix a mostly harmless buffer overread in the sessions module.
Lemon bug fix: Do not merge action routines unless their destructors are
also identical. Problem and suggested fix reported on the mailing list
by Kelvin Sherlock.
Change the sqlite3Atoi64() routine so that it returns failure if not all of
the input characters are consumed, even if it consumed all characters up to
the first 0x00. This has no impact on external APIs as far as I can tell.
More simplification of the sqlite3AtoF() routine. Add special comments
to indicate branches that are for optimization purposes only and that give
the correct answer even if always or never taken.
dan [Wed, 27 Apr 2016 11:24:42 +0000 (11:24 +0000)]
Fix a couple of test script problems on this branch. Both related to the fact that temp database page sizes can no longer be changed by VACUUM or the backup API after the temp db is populated.
When checking for the WHERE-clause push-down optimization, verify that
all terms of the compound inner SELECT are non-aggregate, not just the
last term. Fix for ticket [f7f8c97e97597].
Fix the fix to the temporary directory search algorithm so that it continues
to return "." as a fallback if that directory has the correct permissions.
Change the temporary directory search algorithm on unix so that directories
with only -wx permission are allowed. And do not allow "." to be returned if
it lacks -wx permission.
dan [Thu, 21 Apr 2016 16:44:38 +0000 (16:44 +0000)]
If a call to sqlite3rbu_close() on an rbu handle opened by sqlite3rbu_vacuum() returns other than SQLITE_OK, delete the contents of the rbu_state table. This ensures that if an RBU vacuum operation either completes successfully or encounters an error, the next call to sqlite3rbu_vacuum() with the same parameters starts a new RBU vacuum operation.
Revert sqlite3_enable_load_extension() to its original long-standing behavior.
Add SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION which will enable only the C-API and
leave the SQL function disabled.
<b>API Change:</b> Modify sqlite3_enable_load_extension() so that it only
enables/disables the load_extension() SQL function, and leaves the C-APIs
enabled at all times. In this way, applications can enable extension loading
for the C interface without having to expose that capability to the SQL.
dan [Tue, 19 Apr 2016 19:27:09 +0000 (19:27 +0000)]
Updates to ensure the values of PRAGMA settings like "page_size", "auto_vacuum", "user_version" and "application_id" are not lost when a database is RBU vacuumed.
dan [Tue, 19 Apr 2016 17:11:05 +0000 (17:11 +0000)]
When an RBU vacuum is started on a db identified using a URI filename, pass the same URI parameters when creating the new version of the db. This ensures that RBU vacuum works with password protected databases.
dan [Tue, 19 Apr 2016 16:20:24 +0000 (16:20 +0000)]
Detect attempts to use rbu vacuum on a wal mode database (not allowed). And attempts to write to a database in the middle of an rbu vacuum (which prevents the vacuum from resuming).
dan [Sat, 16 Apr 2016 17:53:14 +0000 (17:53 +0000)]
Avoid creating any extra files ("<target>-vacuum") when running an RBU vacuum. Ensure that the OAL file created is "<target>-oal", not "<target>-vacuum-oal".
CLI enhancement: Add the ".eqp full" option, that shows both the EXPLAIN
QUERY PLAN and the EXPLAIN output for each command run. Also disable
any ".wheretrace" and ".selecttrace" when showing EQP output.