]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
9 years agoRearrange code so that tests pass whether SQLITE_DEBUG is defined or not. fts5-data-version
dan [Mon, 21 Mar 2016 15:18:13 +0000 (15:18 +0000)] 
Rearrange code so that tests pass whether SQLITE_DEBUG is defined or not.

FossilOrigin-Name: 89296a46c3b891ee0b637ff6f89d828d6e46e7b5

9 years agoAdd test file fts5multiclient.test.
dan [Sat, 19 Mar 2016 14:47:28 +0000 (14:47 +0000)] 
Add test file fts5multiclient.test.

FossilOrigin-Name: 7832466f9177cca59455ba272802145297fcd53d

9 years agoFix some OOM-handling issues in the fts5 changes on this branch.
dan [Thu, 17 Mar 2016 12:39:56 +0000 (12:39 +0000)] 
Fix some OOM-handling issues in the fts5 changes on this branch.

FossilOrigin-Name: 020a0bda59fe93b9361ceeed0d5a8ba4177380c8

9 years agoMerge the changes on the reusable-pragma branch into this one.
dan [Wed, 16 Mar 2016 20:53:33 +0000 (20:53 +0000)] 
Merge the changes on the reusable-pragma branch into this one.

FossilOrigin-Name: 6c4a17b963916d19c9433d7a251338042f32e9fa

9 years agoSome pragmas can be reused without an automatic reprepare. reusable-pragma
drh [Wed, 16 Mar 2016 20:44:45 +0000 (20:44 +0000)] 
Some pragmas can be reused without an automatic reprepare.

FossilOrigin-Name: db1ce7e13e656fcd2766f1b1f225cbfefe8f73ad

9 years agoFix a comment on the freelist_count and data_version pragmas.
drh [Wed, 16 Mar 2016 20:05:57 +0000 (20:05 +0000)] 
Fix a comment on the freelist_count and data_version pragmas.

FossilOrigin-Name: 10a3e2a01db9f80452a2a3369fd25b6fd9798274

9 years agoAdd a cast to an implict (size_t -> int) conversion in fts5_expr.c.
dan [Wed, 16 Mar 2016 19:53:58 +0000 (19:53 +0000)] 
Add a cast to an implict (size_t -> int) conversion in fts5_expr.c.

FossilOrigin-Name: d9b5ff7aba3a8f6ca4505eac308fa9d510254c3e

9 years agoHave fts5 cache the decoded structure of fts5 indexes in memory. Use "PRAGMA data_ver...
dan [Wed, 16 Mar 2016 19:48:10 +0000 (19:48 +0000)] 
Have fts5 cache the decoded structure of fts5 indexes in memory. Use "PRAGMA data_version" to detect stale caches.

FossilOrigin-Name: 33ef2210ef19e55c8d460bfe9d3dc146034c8acc

9 years agoEnhance Lemon so that it reorders the reduce rules such that rules without
drh [Wed, 16 Mar 2016 19:45:54 +0000 (19:45 +0000)] 
Enhance Lemon so that it reorders the reduce rules such that rules without
actions occur at the end and so that the first rule is number 0.  This
reduces the size of the jump table on the reduce switch, and helps the parser
to run faster.

FossilOrigin-Name: d5712f21ec758ff096a7b1bb8ed4fc5ec400ca5d

9 years agoAvoid a few unnecessary fstat()s on journal files.
drh [Wed, 16 Mar 2016 19:10:46 +0000 (19:10 +0000)] 
Avoid a few unnecessary fstat()s on journal files.

FossilOrigin-Name: dbf84705913c0845ca4e75eb30c91536c754efeb

9 years agoFix the query planner so that it is able to use the integer primary key
drh [Wed, 16 Mar 2016 18:26:54 +0000 (18:26 +0000)] 
Fix the query planner so that it is able to use the integer primary key
from an index as part of a multi-column constraint.

FossilOrigin-Name: 96ea9909429f0b3b4a67002e8340ae3f7dc0b73f

9 years agoAdd the SQLITE_OMIT_CODEC_FROM_TCL compile-time option.
drh [Wed, 16 Mar 2016 01:03:10 +0000 (01:03 +0000)] 
Add the SQLITE_OMIT_CODEC_FROM_TCL compile-time option.

FossilOrigin-Name: 45f7f0c80bd91a0c7ff859c27fd9e82e551bd83e

9 years agoRearrange some internal fields in the sqlite3_stmt object to avoid a harmless
drh [Wed, 16 Mar 2016 00:36:19 +0000 (00:36 +0000)] 
Rearrange some internal fields in the sqlite3_stmt object to avoid a harmless
TSAN warning.

FossilOrigin-Name: e0b116edd64a55c971c368685aa343cb6beed0f1

9 years agoChange the OP_IntegrityCk opcode to accept the list of root pages as an
drh [Tue, 15 Mar 2016 22:00:39 +0000 (22:00 +0000)] 
Change the OP_IntegrityCk opcode to accept the list of root pages as an
intarray argument in P4.  Slightly smaller and faster.

FossilOrigin-Name: 15e4a272df46cbad8e71b21551dc06a126d64d46

9 years agoIn the Win32 VFS, use SQLITE_FCNTL_LAST_ERRNO instead of (the older) SQLITE_LAST_ERRNO.
mistachkin [Tue, 15 Mar 2016 19:10:39 +0000 (19:10 +0000)] 
In the Win32 VFS, use SQLITE_FCNTL_LAST_ERRNO instead of (the older) SQLITE_LAST_ERRNO.

FossilOrigin-Name: 9463762c437488970a87093ef13131c39b2adadc

9 years agoImplement FROM-clause subqueries as co-routines whenever they are guaranteed
drh [Tue, 15 Mar 2016 17:52:12 +0000 (17:52 +0000)] 
Implement FROM-clause subqueries as co-routines whenever they are guaranteed
to be the outer-most loop of the join.

FossilOrigin-Name: c7bae50bdccb5bcf3bc22e8ac5bb6725ef13db39

9 years agoMore test-case changes so that everything works when the reserved_bytes
drh [Tue, 15 Mar 2016 12:37:08 +0000 (12:37 +0000)] 
More test-case changes so that everything works when the reserved_bytes
value in the header is non-zero.

FossilOrigin-Name: 2fd095b14b03a508169bba710d2e8e2addf4b8f5

9 years agoFix the shellN.test test scripts so that they work with the --testdir option.
dan [Tue, 15 Mar 2016 09:55:44 +0000 (09:55 +0000)] 
Fix the shellN.test test scripts so that they work with the --testdir option.

FossilOrigin-Name: 051c61ebae921b70f843c55aacf046a9922cc187

9 years agoFix the permutations.test script so that it works again.
drh [Mon, 14 Mar 2016 21:26:25 +0000 (21:26 +0000)] 
Fix the permutations.test script so that it works again.

FossilOrigin-Name: 9f194f90c07d5415b1d6bb10ec049f74999d6885

9 years agoUpdate test scripts so that they work with SEE.
drh [Mon, 14 Mar 2016 21:12:26 +0000 (21:12 +0000)] 
Update test scripts so that they work with SEE.

FossilOrigin-Name: f4693ba4bbd9738b45012cf507fc0d7b6d04b7ee

9 years agoChanging page size using VACUUM or backup is not allowed with a codec attached. see-testing
drh [Mon, 14 Mar 2016 20:49:24 +0000 (20:49 +0000)] 
Changing page size using VACUUM or backup is not allowed with a codec attached.

FossilOrigin-Name: 92be06c1a828d56652fa5269a3029f8cb029b2cd

9 years agoMerge test script fixes from trunk.
drh [Mon, 14 Mar 2016 18:42:04 +0000 (18:42 +0000)] 
Merge test script fixes from trunk.

FossilOrigin-Name: ea1d2cddd59192251ee5fd912b190cded4959879

9 years agoMany more test cases fixed. Only a few remain.
drh [Mon, 14 Mar 2016 18:34:42 +0000 (18:34 +0000)] 
Many more test cases fixed.  Only a few remain.

FossilOrigin-Name: 99b9d7eef68fd6d5c9eecb5fbe3dfe002c1ca4a8

9 years agoMany test cases fixed to work with encryption.
drh [Mon, 14 Mar 2016 17:05:04 +0000 (17:05 +0000)] 
Many test cases fixed to work with encryption.

FossilOrigin-Name: d866fffb8b1af5003a8730ce7029d1edddb24d46

9 years agoTest script changes to support testing the SQLite Encryption Extension.
drh [Mon, 14 Mar 2016 16:16:43 +0000 (16:16 +0000)] 
Test script changes to support testing the SQLite Encryption Extension.

FossilOrigin-Name: 1c70aa5c014fc48ab06215992a61c6f92490abe4

9 years agoFix the backcompat.test script so that it works with the --testdir test option.
dan [Mon, 14 Mar 2016 15:43:03 +0000 (15:43 +0000)] 
Fix the backcompat.test script so that it works with the --testdir test option.

FossilOrigin-Name: f7480e33eb82f2eae219d17ce46cd2d4edac07d2

9 years agoRun TCL tests in the "testdir" subdirectory.
drh [Mon, 14 Mar 2016 15:03:54 +0000 (15:03 +0000)] 
Run TCL tests in the "testdir" subdirectory.

FossilOrigin-Name: 90e0cc7b0be31ee2f155c2c053b0cbac584f6154

9 years agoMore file pathname normalization. test-in-subdir
drh [Mon, 14 Mar 2016 14:59:35 +0000 (14:59 +0000)] 
More file pathname normalization.

FossilOrigin-Name: fa8c12921f8361f1889724bb7c5f7eca9c48b075

9 years agoNormalize the $testdir and $argv0 paths so that they continue to work
drh [Mon, 14 Mar 2016 14:28:43 +0000 (14:28 +0000)] 
Normalize the $testdir and $argv0 paths so that they continue to work
in the testing subdirectory.

FossilOrigin-Name: 19225b8130f1640772fc54250583b571a89063b6

9 years agoRun TCL tests in a subdirectory "testdir".
drh [Mon, 14 Mar 2016 13:42:29 +0000 (13:42 +0000)] 
Run TCL tests in a subdirectory "testdir".

FossilOrigin-Name: f632bba0d6ad3edc60f4127380ce8320378dac42

9 years agoFix a memory leak in fts5 that could occur following a syntax error in a query expres...
dan [Mon, 14 Mar 2016 12:16:23 +0000 (12:16 +0000)] 
Fix a memory leak in fts5 that could occur following a syntax error in a query expression.

FossilOrigin-Name: 54b8968e335760105206b894672213c1d56771a4

9 years agoFix a problem handling 'NEAR("" token)' in fts5 found by fuzzing.
dan [Sat, 12 Mar 2016 19:33:47 +0000 (19:33 +0000)] 
Fix a problem handling 'NEAR("" token)' in fts5 found by fuzzing.

FossilOrigin-Name: 10a827ae5f3f322af836c15e581fdc958a433a5a

9 years agoFix handling of strings that contain zero tokens in fts5. And other problems found...
dan [Sat, 12 Mar 2016 16:32:16 +0000 (16:32 +0000)] 
Fix handling of strings that contain zero tokens in fts5. And other problems found by fuzzing.

FossilOrigin-Name: 72b3ff0f0df83e62adda6584b4281cf086d45e45

9 years agoDo not allow the use of WAL mode with nolock=1 because it does not work.
drh [Fri, 11 Mar 2016 23:07:30 +0000 (23:07 +0000)] 
Do not allow the use of WAL mode with nolock=1 because it does not work.

FossilOrigin-Name: 74f5d3b07f6e5e977858c73957c6f9337ae3ca3e

9 years agoTweak the amalgamation autoconf files so that the --disable-static-shell option works...
dan [Fri, 11 Mar 2016 15:25:13 +0000 (15:25 +0000)] 
Tweak the amalgamation autoconf files so that the --disable-static-shell option works again.

FossilOrigin-Name: 83efcdebfa255cd0663ecc6b74eb99183e2f3a10

9 years agoUpdate spellfix1_scriptcode() to output 215 (latin) for pure numeric text.
drh [Fri, 11 Mar 2016 14:30:18 +0000 (14:30 +0000)] 
Update spellfix1_scriptcode() to output 215 (latin) for pure numeric text.

FossilOrigin-Name: df44308b862e932ff0ad25b6328d13be22047b96

9 years agoCheck for PDB files prior to attempting to copy them in the MSVC batch build tool.
mistachkin [Thu, 10 Mar 2016 19:08:44 +0000 (19:08 +0000)] 
Check for PDB files prior to attempting to copy them in the MSVC batch build tool.

FossilOrigin-Name: d7c20f04e69fb1848b2e2f3b04fbd56e06c7c854

9 years agoAdd tests to cover untested branches in recent fts5 changes.
dan [Thu, 10 Mar 2016 15:12:47 +0000 (15:12 +0000)] 
Add tests to cover untested branches in recent fts5 changes.

FossilOrigin-Name: fa0033edf6ddf3c6631fa95b343225dbc8ac9429

9 years agoUse #ifdefs to remove code that is unreachable in some configurations, replacing
drh [Thu, 10 Mar 2016 14:28:24 +0000 (14:28 +0000)] 
Use #ifdefs to remove code that is unreachable in some configurations, replacing
it with an assert().

FossilOrigin-Name: f96ec84d605fd73c323344a753acf35b76307af9

9 years agoRemove an unused local variable.
drh [Thu, 10 Mar 2016 14:22:42 +0000 (14:22 +0000)] 
Remove an unused local variable.

FossilOrigin-Name: 3c343c3d012367942037e64a9855b825cb459844

9 years agoAdd an incremental optimize capability to fts5. Make the 'merge' command independent...
dan [Wed, 9 Mar 2016 20:54:14 +0000 (20:54 +0000)] 
Add an incremental optimize capability to fts5. Make the 'merge' command independent of the 'automerge' settings.

FossilOrigin-Name: 556671444c03e3afca072d0f5e9bea2657de6fd3

9 years agoFix a problem in fts3/4 that was causing it to discard data cached in-memory if an...
dan [Wed, 9 Mar 2016 18:17:42 +0000 (18:17 +0000)] 
Fix a problem in fts3/4 that was causing it to discard data cached in-memory if an 'optimize' command is run when there is no data on disk. The usual way this would happen is if the very first transaction that writes to the fts3/4 table also includes an 'optimize' command.

FossilOrigin-Name: 79338b991bf01e81d336790ca87a0fa747da4ff3

9 years agoSlight simplification to the query optimizer logic associated with IN (SELECT).
drh [Wed, 9 Mar 2016 15:34:51 +0000 (15:34 +0000)] 
Slight simplification to the query optimizer logic associated with IN (SELECT).

FossilOrigin-Name: 2c55c3c2950cafdc256ab540f60dc4609b9c354b

9 years agoAdd another test case for bug [5e3c8867].
dan [Wed, 9 Mar 2016 15:14:54 +0000 (15:14 +0000)] 
Add another test case for bug [5e3c8867].

FossilOrigin-Name: d91e57e49f23414ec9211b775eb11cd6230a4f96

9 years agoWhen optimizing expressions of the form "x IN (SELECT ...)" make sure that
drh [Wed, 9 Mar 2016 15:09:22 +0000 (15:09 +0000)] 
When optimizing expressions of the form "x IN (SELECT ...)" make sure that
the subquery is not correlated.  Fix for ticket [5e3c886796e5512].

FossilOrigin-Name: 1ed6b06ea3c432f920fb2b66b6042be906c5d21c

9 years agoAutomatically disable SQLITE_ENABLE_EXPLAIN_COMMENTS if SQLITE_OMIT_EXPLAIN
drh [Wed, 9 Mar 2016 13:39:43 +0000 (13:39 +0000)] 
Automatically disable SQLITE_ENABLE_EXPLAIN_COMMENTS if SQLITE_OMIT_EXPLAIN
is defined.

FossilOrigin-Name: 8d4b6b2b519a80f831d64345ac26db825b0e2ebe

9 years agoIn the query planner, make sure OOM errors are reported up into
drh [Wed, 9 Mar 2016 12:35:18 +0000 (12:35 +0000)] 
In the query planner, make sure OOM errors are reported up into
whereLoopAddVirtual() so that it shuts down appropriately.

FossilOrigin-Name: a13c59d08bcbc6f26ce6ac761a892eff8f035201

9 years agoDisable the bestindex*.test modules when building without virtual table support.
drh [Wed, 9 Mar 2016 11:59:16 +0000 (11:59 +0000)] 
Disable the bestindex*.test modules when building without virtual table support.

FossilOrigin-Name: e0bac2f3eed900d3a26de339fb7d5963f9b47724

9 years agoSimplifications to the memjournal.c logic to facilitate testing.
drh [Wed, 9 Mar 2016 04:17:17 +0000 (04:17 +0000)] 
Simplifications to the memjournal.c logic to facilitate testing.

FossilOrigin-Name: 8baa2c2c7698e03418531482a8314a5d7ae2c7d3

9 years agoMove the write failure test in memjrnlCreateFile() to just after the
drh [Wed, 9 Mar 2016 03:44:32 +0000 (03:44 +0000)] 
Move the write failure test in memjrnlCreateFile() to just after the
actual write, thus reducing the number of instances of the test by one.

FossilOrigin-Name: 7f00d80c63b15376391f661d872f2b29a970702d

9 years agoUpdate a comment in btree.c to account for WITHOUT ROWID tables. No code
drh [Wed, 9 Mar 2016 03:29:27 +0000 (03:29 +0000)] 
Update a comment in btree.c to account for WITHOUT ROWID tables.  No code
changes.

FossilOrigin-Name: fa20dcb03b92be3bb32f8e3d6f88681ace3f6c84

9 years agoChange a branch made obsolete by recent parser enhancements into an assert().
drh [Wed, 9 Mar 2016 02:12:44 +0000 (02:12 +0000)] 
Change a branch made obsolete by recent parser enhancements into an assert().

FossilOrigin-Name: ee486ef742557244f532e8d3b3604ff04e024b8a

9 years agoAdd an #ifdef and an ALWAYS() for coverage.
drh [Wed, 9 Mar 2016 02:03:03 +0000 (02:03 +0000)] 
Add an #ifdef and an ALWAYS() for coverage.

FossilOrigin-Name: 069337a922867ad0d023f5bf36e13ea46e047000

9 years agoChange an unreachable branch in the virtual table query planner into
drh [Tue, 8 Mar 2016 23:44:48 +0000 (23:44 +0000)] 
Change an unreachable branch in the virtual table query planner into
an assert().

FossilOrigin-Name: 73b97b9ec3c39ab2828ae6353b5d7e04a27996c9

9 years agoImproved comments on virtual table query planning. Added many new
drh [Tue, 8 Mar 2016 23:18:51 +0000 (23:18 +0000)] 
Improved comments on virtual table query planning.  Added many new
WHERETRACE() macros.

FossilOrigin-Name: 4c89c2534abcf67bc486d5a900a84a6c4f59537e

9 years agoIn memjournal.c, reuse the same sqlite3_file object for both the in-memory
drh [Tue, 8 Mar 2016 17:59:19 +0000 (17:59 +0000)] 
In memjournal.c, reuse the same sqlite3_file object for both the in-memory
phase and the on-disk phase.

FossilOrigin-Name: e7fbbdc25c0991d4e58d78a5fcb7386e1aa7f3af

9 years agoModify the memjournal.c code to make it a bit smaller. memjournal-exp
dan [Tue, 8 Mar 2016 17:44:08 +0000 (17:44 +0000)] 
Modify the memjournal.c code to make it a bit smaller.

FossilOrigin-Name: d99ac4154812065eef26c298de52954d7ee0bd75

9 years agoDrop support for SQLITE_EXTRA_DURABLE. The new SQLITE_DEFAULT_SYNCHRONOUS
drh [Tue, 8 Mar 2016 16:07:59 +0000 (16:07 +0000)] 
Drop support for SQLITE_EXTRA_DURABLE.  The new SQLITE_DEFAULT_SYNCHRONOUS
compile-time option is a more general replacement.

FossilOrigin-Name: f6d3156ba9af1da517dd77c1df03fa7869888463

9 years agoRemove an unused goto label in the RBU extension.
drh [Tue, 8 Mar 2016 16:02:37 +0000 (16:02 +0000)] 
Remove an unused goto label in the RBU extension.

FossilOrigin-Name: 2179a106e8dd7943d4f37093e65ce7826720904e

9 years agoAdd a new row type to RBU (a peer of insert, update and delete) - "delete then insert".
dan [Tue, 8 Mar 2016 15:52:43 +0000 (15:52 +0000)] 
Add a new row type to RBU (a peer of insert, update and delete) - "delete then insert".

FossilOrigin-Name: 1d9468d2427d2c9b7240b364554ac85a0b62fa44

9 years agoAdd the SQLITE_DEFAULT_SYNCHRONOUS and SQLITE_DEFAULT_WAL_SYNCHRONOUS
drh [Tue, 8 Mar 2016 15:47:47 +0000 (15:47 +0000)] 
Add the SQLITE_DEFAULT_SYNCHRONOUS and SQLITE_DEFAULT_WAL_SYNCHRONOUS
compile-time options.  Automatically switch to the WAL_SYNCHRONOUS setting
when first opening a WAL-mode database if the synchronous setting has not
been previously set by the application.

FossilOrigin-Name: 5a847a676e756bbe33436596d4279f339bfb247c

9 years agoUpdate fts3/4 so that the 'merge=X,Y' command merges at least, instead of exactly...
dan [Tue, 8 Mar 2016 15:37:48 +0000 (15:37 +0000)] 
Update fts3/4 so that the 'merge=X,Y' command merges at least, instead of exactly, Y segments from a single level. This matches the documentation. 'merge=X,0' is, as it was in 3.11, an error.

FossilOrigin-Name: 64b3cb29159491cbfab7e01844b54408541ece5e

9 years agoMake the SQLITE_DEFAULT_SYNCHRONOUS and SQLITE_DEFAULT_WAL_SYNCHRONOUS default-synchronous
drh [Tue, 8 Mar 2016 15:30:01 +0000 (15:30 +0000)] 
Make the SQLITE_DEFAULT_SYNCHRONOUS and SQLITE_DEFAULT_WAL_SYNCHRONOUS
values zero-based to agree with PRAGMA synchronous.

FossilOrigin-Name: 592d2104361500e5002783ba329a2609389c57b9

9 years agoIf SQLITE_DEFAULT_WAL_SYNCHRONOUS is not the same value as
drh [Tue, 8 Mar 2016 15:14:26 +0000 (15:14 +0000)] 
If SQLITE_DEFAULT_WAL_SYNCHRONOUS is not the same value as
SQLITE_DEFAULT_SYNCHRONOUS and the application has not run
"PRAGMA synchronous", then set synchronous to the
SQLITE_DEFAULT_WAL_SYNCHRONOUS setting when entering WAL mode for
the first time.

FossilOrigin-Name: 5791407b523abd24e832fc2361b3e9f01ee2f36a

9 years agoAdd compile-time options SQLITE_DEFAULT_SYNCHRONOUS and
drh [Tue, 8 Mar 2016 14:40:11 +0000 (14:40 +0000)] 
Add compile-time options SQLITE_DEFAULT_SYNCHRONOUS and
SQLITE_DEFAULT_WAL_SYNCHRONOUS used to specify the default synchronous
settings for all database connections.

FossilOrigin-Name: 1fefa967aa93372d232b96b1e0232b7b855d6d00

9 years agoFix ATTACH to use the symbolic name PAGER_SYNCHRONOUS_FULL rather than
drh [Tue, 8 Mar 2016 14:16:23 +0000 (14:16 +0000)] 
Fix ATTACH to use the symbolic name PAGER_SYNCHRONOUS_FULL rather than
an integer literal.

FossilOrigin-Name: c4e192a0e5a408e198dbacb2752859a00d2b572f

9 years agoFix comments on pager flag settings to include synchronous=EXTRA.
drh [Tue, 8 Mar 2016 13:56:02 +0000 (13:56 +0000)] 
Fix comments on pager flag settings to include synchronous=EXTRA.

FossilOrigin-Name: 3a65a1fc0fd2408c6984153801ec5dcd5211c897

9 years agoSimplified error detection in the xBestIndex processing.
drh [Tue, 8 Mar 2016 02:59:33 +0000 (02:59 +0000)] 
Simplified error detection in the xBestIndex processing.

FossilOrigin-Name: 82ca2131b670505578628687746135ac413d156b

9 years agoAdd the ALLBITS macro as a shorthand for "(Bitmask)(-1)".
drh [Tue, 8 Mar 2016 01:32:30 +0000 (01:32 +0000)] 
Add the ALLBITS macro as a shorthand for "(Bitmask)(-1)".

FossilOrigin-Name: 91bd619d27e4d91510a187bbb88de961a31c8a2e

9 years agoAdd a NEVER() to the code generator. Change the parameter name "mExtra"
drh [Tue, 8 Mar 2016 01:11:51 +0000 (01:11 +0000)] 
Add a NEVER() to the code generator.  Change the parameter name "mExtra"
to "mPrereq" in the query planner, to more closely reflect its meaning.

FossilOrigin-Name: 721ae51e443647291f3a8f7f2128aa410fee2682

9 years agoChanges so that some assert()s in the virtual table query planner are
drh [Tue, 8 Mar 2016 00:39:58 +0000 (00:39 +0000)] 
Changes so that some assert()s in the virtual table query planner are
correct even following an OOM error.

FossilOrigin-Name: 9805f6f85211dcb5a0ab3ceca204e6f2e48530ea

9 years agoUpdate fts3/4 so that the 'merge=X,0' command merges X pages from all segments of...
dan [Mon, 7 Mar 2016 20:14:27 +0000 (20:14 +0000)] 
Update fts3/4 so that the 'merge=X,0' command merges X pages from all segments of the first level in the fts index that contains 2 or more segments.

FossilOrigin-Name: cddf69dbc46f10ee7e87538dd850e086386b544c

9 years agoAvoid a NULL pointer dereference following an OOM while generating code
drh [Mon, 7 Mar 2016 19:08:27 +0000 (19:08 +0000)] 
Avoid a NULL pointer dereference following an OOM while generating code
for IN operators on virtual tables.

FossilOrigin-Name: c924008692e35f1f5144830af08d6de051dd21dd

9 years agoAdd a new row type to RBU (a peer of insert, update and delete) - "delete then insert". rbu-delete-then-insert
dan [Mon, 7 Mar 2016 17:39:30 +0000 (17:39 +0000)] 
Add a new row type to RBU (a peer of insert, update and delete) - "delete then insert".

FossilOrigin-Name: 169311c85b30f625bdb6986c9cd11db70942d73b

9 years agoAdd the SQLITE_CONFIG_STMTJRNL_SPILL option for sqlite3_config().
drh [Mon, 7 Mar 2016 17:37:37 +0000 (17:37 +0000)] 
Add the SQLITE_CONFIG_STMTJRNL_SPILL option for sqlite3_config().

FossilOrigin-Name: b6c4202432dc96f8f1740f52d0bf872116357fcc

9 years agoFix a problem in the previous commit affecting queries with three or more tables...
dan [Sat, 5 Mar 2016 21:32:14 +0000 (21:32 +0000)] 
Fix a problem in the previous commit affecting queries with three or more tables joined together to the right of a LEFT or CROSS JOIN operator.

FossilOrigin-Name: d8d89d69a490a708b83147945f74134ae0e4b387

9 years agoChange the way SQLite invokes the xBestIndex method of virtual tables so that N-way...
dan [Sat, 5 Mar 2016 21:07:49 +0000 (21:07 +0000)] 
Change the way SQLite invokes the xBestIndex method of virtual tables so that N-way joins involving virtual tables work as expected.

FossilOrigin-Name: 195444380bafd3d95d37ad83047c75ca20978de4

9 years agoAdjust the cost estimates for RTREE such that the expected number of rows and xbestindex-fix
drh [Sat, 5 Mar 2016 20:28:24 +0000 (20:28 +0000)] 
Adjust the cost estimates for RTREE such that the expected number of rows and
expected cost is halved for each additional constraint.

FossilOrigin-Name: fd7cd0609381a85673d1f737ebeb19dde3de180f

9 years agoChange the way SQLite invokes the xBestIndex method of virtual tables so that N-way...
dan [Sat, 5 Mar 2016 17:29:08 +0000 (17:29 +0000)] 
Change the way SQLite invokes the xBestIndex method of virtual tables so that N-way joins involving virtual tables work as expected.

FossilOrigin-Name: ffc65968ede2c402e616147e6e3d737e6f9de21d

9 years agoRemove the unused journal.c source file (its function have been subsumed into
drh [Sat, 5 Mar 2016 15:35:09 +0000 (15:35 +0000)] 
Remove the unused journal.c source file (its function have been subsumed into
memjournal.c).  Refactor some of the names in memjournal.c.  No functional
changes.

FossilOrigin-Name: 5f2a262d3f6b1531001326faf1d3b3d92c20a30a

9 years agoWork around (incorrect) ASAN warnings in memjournal.c.
drh [Sat, 5 Mar 2016 15:03:31 +0000 (15:03 +0000)] 
Work around (incorrect) ASAN warnings in memjournal.c.

FossilOrigin-Name: 4de09777dad6188b7e897473700af3c9655e8547

9 years agoFix an integer size mismatch problem in test_bestindex.c
drh [Sat, 5 Mar 2016 14:19:32 +0000 (14:19 +0000)] 
Fix an integer size mismatch problem in test_bestindex.c

FossilOrigin-Name: 2e35eb6b7464455467c868adfbcaad4da16d3207

9 years agoFix an incorrect #ifdef on sqlite3LogEstToInt().
drh [Sat, 5 Mar 2016 14:00:09 +0000 (14:00 +0000)] 
Fix an incorrect #ifdef on sqlite3LogEstToInt().

FossilOrigin-Name: dca7b23354a6b08c926b6ed3f7345d942a409862

9 years agoFix an assert() in sqlite3VarintLen(), even though it is impossible to hit
drh [Fri, 4 Mar 2016 21:18:09 +0000 (21:18 +0000)] 
Fix an assert() in sqlite3VarintLen(), even though it is impossible to hit
in SQLite due to the way sqlite3VarintLen() is used.

FossilOrigin-Name: 251424c5869f43012fc1e1a545de362036b883db

9 years agoDefer opening and writing statement journals until the size reaches a
drh [Fri, 4 Mar 2016 14:43:44 +0000 (14:43 +0000)] 
Defer opening and writing statement journals until the size reaches a
threshold (currently 64KiB).

FossilOrigin-Name: cb9302cca423de41305719a49208daa392ec09da

9 years agoUpdate test cases to taken deferred statement-journal opening into account.
drh [Fri, 4 Mar 2016 14:23:10 +0000 (14:23 +0000)] 
Update test cases to taken deferred statement-journal opening into account.

FossilOrigin-Name: 5b2fe5219ab9ad15969e3374894a75979b65cb3c

9 years agoMerge changes from trunk.
drh [Fri, 4 Mar 2016 13:08:35 +0000 (13:08 +0000)] 
Merge changes from trunk.

FossilOrigin-Name: a87305dfd49ee17632d0bce66ce7c2e9407b7b3e

9 years agoChange the default cache_size to -2000 (which means 2000*1024 bytes
drh [Fri, 4 Mar 2016 04:01:43 +0000 (04:01 +0000)] 
Change the default cache_size to -2000 (which means 2000*1024 bytes
independent of page_size).

FossilOrigin-Name: 2682e8e413fadbca0673f242769af17bfd291559

9 years agoChange the default page size for new database files to 4096 (from 1024).
drh [Fri, 4 Mar 2016 03:43:10 +0000 (03:43 +0000)] 
Change the default page size for new database files to 4096 (from 1024).
Except, when building the testfixture, preserve the legacy page size.
Also fix a comment on SQLITE_MAX_ATTACHED.

FossilOrigin-Name: 2e8a9ca9d3d6efddc31f01074d14acae56568c37

9 years agoDetect the presence of pread()/pwrite() system calls on unix systems and
drh [Fri, 4 Mar 2016 03:20:05 +0000 (03:20 +0000)] 
Detect the presence of pread()/pwrite() system calls on unix systems and
use them if available.

FossilOrigin-Name: 82cbf5ad2ed988a006106e188e98096a52e6779d

9 years agoFurther fixes to the pread()/pwrite() enabling logic. pread
drh [Fri, 4 Mar 2016 03:14:39 +0000 (03:14 +0000)] 
Further fixes to the pread()/pwrite() enabling logic.

FossilOrigin-Name: 38fb54e7854ac0500a88585ff9dd7487b4b2e586

9 years agoFix the build for cases when pread()/pwrite() are not available.
drh [Fri, 4 Mar 2016 03:02:06 +0000 (03:02 +0000)] 
Fix the build for cases when pread()/pwrite() are not available.

FossilOrigin-Name: 7d67d876b70c7a4199697c5b112d809c600e140e

9 years agoAdd the test_bestindex.c file to Makefile.in and Makefile.msc so that
drh [Fri, 4 Mar 2016 02:59:35 +0000 (02:59 +0000)] 
Add the test_bestindex.c file to Makefile.in and Makefile.msc so that
"make test" will work again.

FossilOrigin-Name: 6ec6b6a97e62be1abe1e349b5bc04c6f5ae88968

9 years agoUpdate the configure script to detect pread/pwrite and update os_unix.c to
drh [Fri, 4 Mar 2016 02:38:00 +0000 (02:38 +0000)] 
Update the configure script to detect pread/pwrite and update os_unix.c to
use those routines if they are available.

FossilOrigin-Name: 2cffb9e50bed77d1079603f5b4a71b7559de7294

9 years agoGet in-memory subjournals working for builds without SQLITE_ENABLE_ATOMIC_WRITE.
drh [Fri, 4 Mar 2016 00:13:29 +0000 (00:13 +0000)] 
Get in-memory subjournals working for builds without SQLITE_ENABLE_ATOMIC_WRITE.

FossilOrigin-Name: b5378dcea53d4cd1744d13ddee5e50869607b771

9 years agoMerge the latest updates from trunk.
drh [Thu, 3 Mar 2016 21:29:10 +0000 (21:29 +0000)] 
Merge the latest updates from trunk.

FossilOrigin-Name: 55c00f716dc98b188c91f3a5a010242c9497785f

9 years agoReduce the amount of heap memory required to store many schemas by storing
drh [Thu, 3 Mar 2016 21:22:53 +0000 (21:22 +0000)] 
Reduce the amount of heap memory required to store many schemas by storing
the column datatype appended to the column name (with a \000 separator),
rather than in separate memory allocation.

FossilOrigin-Name: 16fbf2e19c22df9441aef5c8b7f5670adc38a6b6

9 years agoAllow the left-hand side of IN operators on virtual tables to have the
drh [Thu, 3 Mar 2016 20:42:18 +0000 (20:42 +0000)] 
Allow the left-hand side of IN operators on virtual tables to have the
aConstraintUsage[].omit flag clear.

FossilOrigin-Name: 3eb74342740cd393e03aa38cd01690ccab173b76

9 years agoMerge 3.11.1 changes into trunk.
drh [Thu, 3 Mar 2016 17:54:30 +0000 (17:54 +0000)] 
Merge 3.11.1 changes into trunk.

FossilOrigin-Name: 7abc2dd953477797fa05421b061d73596aa025fb

9 years agoVersion 3.11.1 branch-3.11 version-3.11.1
drh [Thu, 3 Mar 2016 16:17:53 +0000 (16:17 +0000)] 
Version 3.11.1

FossilOrigin-Name: f047920ce16971e573bc6ec9a48b118c9de2b3a7