]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
11 years agoMerge the KeyInfo cache mutex fix from trunk.
drh [Tue, 9 Dec 2014 14:54:26 +0000 (14:54 +0000)] 
Merge the KeyInfo cache mutex fix from trunk.

FossilOrigin-Name: f0940c73bd13cb49a3d229ce2517736324392cfb

11 years agoIncrease the default minimum PMA size for multi-threaded sorting from 10x
drh [Tue, 9 Dec 2014 14:42:49 +0000 (14:42 +0000)] 
Increase the default minimum PMA size for multi-threaded sorting from 10x
the page size to 250x the page size.  Provide the SQLITE_SORTER_PMASZ
compile-time option to change this default.

FossilOrigin-Name: b05340fe3cd5f1676a55023228dc8d1a92de5936

11 years agoFix harmless compiler warning.
mistachkin [Tue, 9 Dec 2014 04:26:56 +0000 (04:26 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: e97b7a8b4df784d148fefb9554da0f511e351d9f

11 years agoAdd extra tests to e_walckpt.test.
dan [Mon, 8 Dec 2014 20:29:23 +0000 (20:29 +0000)] 
Add extra tests to e_walckpt.test.

FossilOrigin-Name: d6832aa24c8d93b4532a651b86605bd0a0d0aa78

11 years agoAdd missing mutex calls around a call to sqlite3SchemaGet() within sqlite3_open().
dan [Mon, 8 Dec 2014 20:20:16 +0000 (20:20 +0000)] 
Add missing mutex calls around a call to sqlite3SchemaGet() within sqlite3_open().

FossilOrigin-Name: 45415899545767888d36dcc0bafaf0ef415d94c2

11 years agoAdd a missing mutex around calls to clear the KeyInfo cache when closing
drh [Mon, 8 Dec 2014 18:08:45 +0000 (18:08 +0000)] 
Add a missing mutex around calls to clear the KeyInfo cache when closing
a database connection.

FossilOrigin-Name: 7047ce32a234484b8ba15311e6560aa74ff692c9

11 years agoUpdate this branch with latest trunk changes.
dan [Mon, 8 Dec 2014 07:50:31 +0000 (07:50 +0000)] 
Update this branch with latest trunk changes.

FossilOrigin-Name: 69a312ad3fe5b39bc394b9ce958cb63d734518c7

11 years agoUpdate comments in sqlite3ota.h to remove the "must have PRIMARY KEY" restriction.
dan [Mon, 8 Dec 2014 07:28:26 +0000 (07:28 +0000)] 
Update comments in sqlite3ota.h to remove the "must have PRIMARY KEY" restriction.

FossilOrigin-Name: 088a41eb8c18886a260cf53fa0cca3bd1958dc05

11 years agoExtra tests for the ota_rowid column.
dan [Mon, 8 Dec 2014 07:22:34 +0000 (07:22 +0000)] 
Extra tests for the ota_rowid column.

FossilOrigin-Name: 46069393b3141ab198f0fcc4f6c05229f06bf1e8

11 years agoAllow the ota extension to write to tables with no PRIMARY KEY declaration.
dan [Sat, 6 Dec 2014 19:30:41 +0000 (19:30 +0000)] 
Allow the ota extension to write to tables with no PRIMARY KEY declaration.

FossilOrigin-Name: ba59a7e2ba97244492cbca9247456df0f3f19248

11 years agoAvoid accessing a single uninitialized byte when moving a rare 3-byte cell from an...
dan [Sat, 6 Dec 2014 14:56:49 +0000 (14:56 +0000)] 
Avoid accessing a single uninitialized byte when moving a rare 3-byte cell from an internal page to a leaf. This was not actually causing a problem, just a valgrind warning.

FossilOrigin-Name: 6aeece19a235344be2537e66a3fe08b1febfb5a0

11 years agoFix a (harmless) uninitialized variable reference in b-tree balancing for
drh [Sat, 6 Dec 2014 02:05:44 +0000 (02:05 +0000)] 
Fix a (harmless) uninitialized variable reference in b-tree balancing for
auto-vacuumed tables with overflow pages.

FossilOrigin-Name: dd1dd4451f468599f7a0c2f7b5ee6125db3bb152

11 years agoAvoid a potential NULL pointer deference in the sqlite3_stmt_scanstatus()
drh [Fri, 5 Dec 2014 21:18:19 +0000 (21:18 +0000)] 
Avoid a potential NULL pointer deference in the sqlite3_stmt_scanstatus()
logic.

FossilOrigin-Name: 42d44adc13d52b8dd571c9375eb48298123d5a60

11 years agoFix a buffer overread that might occur in analyze.c if SQLITE_ENABLE_STAT4 was defined.
dan [Fri, 5 Dec 2014 21:04:26 +0000 (21:04 +0000)] 
Fix a buffer overread that might occur in analyze.c if SQLITE_ENABLE_STAT4 was defined.

FossilOrigin-Name: c1ae1268b9023a771fda98f26bf451c6066fe70b

11 years agoAdd new test file e_walckpt.test. Still some tests to come.
dan [Fri, 5 Dec 2014 20:46:19 +0000 (20:46 +0000)] 
Add new test file e_walckpt.test. Still some tests to come.

FossilOrigin-Name: e4db3db3a65ecfd4069a40d436aa7a5512d61a30

11 years agoMerge the fix for the shared-cache KeyInfo cache bug from trunk.
drh [Fri, 5 Dec 2014 20:05:10 +0000 (20:05 +0000)] 
Merge the fix for the shared-cache KeyInfo cache bug from trunk.

FossilOrigin-Name: 5a73da6a3083926a3dafd28c0604122296dc9184

11 years agoMake sure the WhereTerm objects are fully zeroed when they are allocated.
drh [Fri, 5 Dec 2014 19:50:58 +0000 (19:50 +0000)] 
Make sure the WhereTerm objects are fully zeroed when they are allocated.

FossilOrigin-Name: fdb667335c2250239a66143aec4235325dec8274

11 years agoThe KeyInfo cache must be cleared before closing the btree, not after.
drh [Fri, 5 Dec 2014 15:31:33 +0000 (15:31 +0000)] 
The KeyInfo cache must be cleared before closing the btree, not after.
Revised fix for ticket [e4a18565a36884b00edf].

FossilOrigin-Name: 7ed3346e8c10dbf52fd44ab69900699d4f7ad3fd

11 years agoWhen closing a (shared-cache) database connection, be sure to clear out
drh [Fri, 5 Dec 2014 14:44:57 +0000 (14:44 +0000)] 
When closing a (shared-cache) database connection, be sure to clear out
all KeyInfo objects cached on Index objects.
Fix for ticket [e4a18565a36884b00edf].

FossilOrigin-Name: adca7688de20ff40d8ddf2107dfaf92af3873b83

11 years agoImproved comment on the sharedB.test test script. fix-stale-keyinfo-cache
drh [Fri, 5 Dec 2014 14:34:30 +0000 (14:34 +0000)] 
Improved comment on the sharedB.test test script.

FossilOrigin-Name: 71f589e3f82a07513425e212072f32748c0732d4

11 years agoTest case demonstrating the problem described by
drh [Fri, 5 Dec 2014 14:07:53 +0000 (14:07 +0000)] 
Test case demonstrating the problem described by
ticket [e4a18565a36884b00edf].

FossilOrigin-Name: ffea3e905adc108d2dc37f5d6da2024f0389f176

11 years agoWhen closing a (shared-cache) database connection, be sure to clear out all
drh [Fri, 5 Dec 2014 05:38:02 +0000 (05:38 +0000)] 
When closing a (shared-cache) database connection, be sure to clear out all
KeyInfo objects cached on Index objects.
Proposed fix for ticket [e4a18565a36884b00edf].

FossilOrigin-Name: 651ed97de13234be60a1138a98b06d308449a791

11 years agoImport from trunk the fix the "test" target on the autoconf and MSVC makefiles
drh [Fri, 5 Dec 2014 00:41:17 +0000 (00:41 +0000)] 
Import from trunk the fix the "test" target on the autoconf and MSVC makefiles
and some minor compiler warning fixes.

FossilOrigin-Name: c9f20eb2fbba0868df85ebb98877f9bb969be8a4

11 years agoFix compiler warnings.
drh [Fri, 5 Dec 2014 00:32:09 +0000 (00:32 +0000)] 
Fix compiler warnings.

FossilOrigin-Name: e9955c0e14d13ba1411f013acb4979958dae2516

11 years agoFix the autoconf and MSVC makefiles, which have been broken for nearly a
drh [Fri, 5 Dec 2014 00:17:39 +0000 (00:17 +0000)] 
Fix the autoconf and MSVC makefiles, which have been broken for nearly a
month.  :-(

FossilOrigin-Name: 520c2b838da8b230487c8c66f3ba8e5daa1ca886

11 years agoIncorporate the SQLITE_CHECKPOINT_TRUNCATE enhancement and a couple of
drh [Thu, 4 Dec 2014 23:35:08 +0000 (23:35 +0000)] 
Incorporate the SQLITE_CHECKPOINT_TRUNCATE enhancement and a couple of
obscure bug fixes from trunk.

FossilOrigin-Name: 34ffa3b3c002b0e87d8382ad76e87dbaec0b2bc6

11 years agoMake sure that a DISTINCT query with an ORDER BY works correctly even if
drh [Thu, 4 Dec 2014 21:54:58 +0000 (21:54 +0000)] 
Make sure that a DISTINCT query with an ORDER BY works correctly even if
it uses a descending index.  Fix for ticket [c5ea805691bfc4204b1cb9e].

FossilOrigin-Name: 0d3aef97ebddf422b8bdcbc5878970c6129e3f54

11 years agoPerformance enhancement for single-table queries with many OR-connected
drh [Thu, 4 Dec 2014 20:24:50 +0000 (20:24 +0000)] 
Performance enhancement for single-table queries with many OR-connected
WHERE clause terms and multiple indexes with the same left-most columns.

FossilOrigin-Name: 1461d543ac8a3e4a54405067893146c74576bb4e

11 years agoIf a table is the right operand of a LEFT JOIN, then any column of that
drh [Thu, 4 Dec 2014 16:27:17 +0000 (16:27 +0000)] 
If a table is the right operand of a LEFT JOIN, then any column of that
table can be NULL even if that column as a NOT NULL constraint.
Fix for ticket [6f2222d550f5b0ee7ed].

FossilOrigin-Name: 6f6fcbe4736b9468a495c684d5eebc8bfe5c566a

11 years agoClarification of the meaning of the second parameter to the busy-handler
drh [Thu, 4 Dec 2014 15:02:03 +0000 (15:02 +0000)] 
Clarification of the meaning of the second parameter to the busy-handler
callback.  No changes to code.

FossilOrigin-Name: 1e2bc484f8e7766a493bfeab04d82e50f37217b8

11 years agoFix comment typos reported on the mailing list. No changes to code.
drh [Thu, 4 Dec 2014 14:01:39 +0000 (14:01 +0000)] 
Fix comment typos reported on the mailing list.  No changes to code.

FossilOrigin-Name: 93a71c9f058b58d11187293a1e8d5324d0911880

11 years agoAdd an implementation mark and fix a comment describing the OP_Checkpoint
drh [Thu, 4 Dec 2014 04:50:59 +0000 (04:50 +0000)] 
Add an implementation mark and fix a comment describing the OP_Checkpoint
opcode.

FossilOrigin-Name: 7475b90c558157802b036162376fceacc1b9ab4a

11 years agoAdd evidence marks and assert()s used as evidence for checkpoint requirements.
drh [Wed, 3 Dec 2014 19:25:41 +0000 (19:25 +0000)] 
Add evidence marks and assert()s used as evidence for checkpoint requirements.

FossilOrigin-Name: b2da8afc7657266fbe8e683c6e50fe18216cbcf3

11 years agoFix over-length comment lines in sqlite.h.in. No changes to code.
drh [Wed, 3 Dec 2014 19:08:00 +0000 (19:08 +0000)] 
Fix over-length comment lines in sqlite.h.in.  No changes to code.

FossilOrigin-Name: cbd357fd8c25c9c6043063710a3e2a89ff8b4575

11 years agoSimplify the sqlite3_wal_checkpoint() documentation. Add some source code
drh [Wed, 3 Dec 2014 18:32:47 +0000 (18:32 +0000)] 
Simplify the sqlite3_wal_checkpoint() documentation.  Add some source code
evidence marks.

FossilOrigin-Name: 026c44ff2c092b14faa19985dd46873aeb8727dc

11 years agoBegin testing fts5 OOM and IO error handling.
dan [Wed, 3 Dec 2014 17:27:35 +0000 (17:27 +0000)] 
Begin testing fts5 OOM and IO error handling.

FossilOrigin-Name: 2037dba62fdd995ad15b642abe499a790f5ffe5c

11 years agoFuther tweaks to the sqlite3_wal_checkpoint_v2() documentation.
drh [Wed, 3 Dec 2014 16:30:27 +0000 (16:30 +0000)] 
Futher tweaks to the sqlite3_wal_checkpoint_v2() documentation.

FossilOrigin-Name: 7d284d047b0677fb4532df5aae06f5bad997f5e9

11 years agoUpdates to the documentation for sqlite3_wal_checkpoint_v2() and related
drh [Wed, 3 Dec 2014 15:50:09 +0000 (15:50 +0000)] 
Updates to the documentation for sqlite3_wal_checkpoint_v2() and related
interfaces, including adding many requirements marks.

FossilOrigin-Name: 1e212d9899387344fd62c7b6fbcc59ea885b6d7c

11 years agoAdd support for SQLITE_CHECKPOINT_TRUNCATE.
drh [Tue, 2 Dec 2014 20:51:52 +0000 (20:51 +0000)] 
Add support for SQLITE_CHECKPOINT_TRUNCATE.

FossilOrigin-Name: edda2b9e7a15ed486de81b10dd9bacd39c571d3f

11 years agoAdd a configuration option to remap the "rank" column to an auxiliary fts5 function.
dan [Tue, 2 Dec 2014 20:18:11 +0000 (20:18 +0000)] 
Add a configuration option to remap the "rank" column to an auxiliary fts5 function.

FossilOrigin-Name: b5f5971283b9b2f60c16f9675099855af95012cd

11 years agoWhen attempting to restart a wal file, make any required calls to sqlite3_randomness... checkpoint-truncate
dan [Tue, 2 Dec 2014 19:35:09 +0000 (19:35 +0000)] 
When attempting to restart a wal file, make any required calls to sqlite3_randomness() before waiting on or checking for wal file readers. This restores the behaviour exhibited by the trunk.

FossilOrigin-Name: 6ee08769f0ffbb3d620c66b89180ece7782dc820

11 years agoAdd the SQLITE_CHECKPOINT_TRUNCATE option.
dan [Tue, 2 Dec 2014 19:04:54 +0000 (19:04 +0000)] 
Add the SQLITE_CHECKPOINT_TRUNCATE option.

FossilOrigin-Name: 8e20a43419e46b6b9d1f60ec7ea420bbfb3ef358

11 years agoMerge all recent fixes and enhancements from trunk into sessions.
drh [Tue, 2 Dec 2014 16:31:01 +0000 (16:31 +0000)] 
Merge all recent fixes and enhancements from trunk into sessions.

FossilOrigin-Name: 2617d93713d9f4cf907ab2e7baef6a0f74f7198e

11 years agoConvert two unreachable branches into assert() statements.
drh [Tue, 2 Dec 2014 16:16:47 +0000 (16:16 +0000)] 
Convert two unreachable branches into assert() statements.

FossilOrigin-Name: 61b31e771430f490fc2c4cef55046debc4a5f4f5

11 years agoWork around overzealous NULL pointer checking in memcpy() and memset() for
drh [Tue, 2 Dec 2014 13:46:53 +0000 (13:46 +0000)] 
Work around overzealous NULL pointer checking in memcpy() and memset() for
some systems.

FossilOrigin-Name: 0d04f380e1bd17104b3cf76b64d0cfc79a726606

11 years agoAdd code to parse a rank() function specification. And a tcl interface to add auxilia...
dan [Mon, 1 Dec 2014 20:05:00 +0000 (20:05 +0000)] 
Add code to parse a rank() function specification. And a tcl interface to add auxiliary functions to fts5.

FossilOrigin-Name: 9c1697a2aa1f601e6eb11704abe63a73c8105447

11 years agoAdd a cookie mechanism to ensure that the %_config table is re-read as required.
dan [Fri, 28 Nov 2014 20:01:13 +0000 (20:01 +0000)] 
Add a cookie mechanism to ensure that the %_config table is re-read as required.

FossilOrigin-Name: bb4a37b53de60da9ec8b9317eec14afa99690828

11 years agoRemove the ill-designed "-end" option from the command-line shell. Instead,
drh [Fri, 28 Nov 2014 13:35:03 +0000 (13:35 +0000)] 
Remove the ill-designed "-end" option from the command-line shell.  Instead,
allow multiple SQL or dot-commands as command-line arguments.  Any -cmd
commands are processed first, followed by other command-line arguments, for
backwards compatibility.

FossilOrigin-Name: 24fa2e9832daaa5d68ee28a00c56c55f97a4da9e

11 years agoAdd the -end option to the command-line shell, which forces it to exit after
drh [Fri, 28 Nov 2014 11:54:44 +0000 (11:54 +0000)] 
Add the -end option to the command-line shell, which forces it to exit after
reading prior command-line options (presumably including one or more -cmd
options) and without reading standard input.

FossilOrigin-Name: b59397b1f1e32c478b5fa96659cd4300177d39f7

11 years agoAdd a %_config table to fts5.
dan [Thu, 27 Nov 2014 20:03:45 +0000 (20:03 +0000)] 
Add a %_config table to fts5.

FossilOrigin-Name: 83491c56661ca78f96020ba68184bb3fb19e674f

11 years agoUpdate ota so that the hidden columns of virtual tables may be written.
dan [Thu, 27 Nov 2014 18:09:46 +0000 (18:09 +0000)] 
Update ota so that the hidden columns of virtual tables may be written.

FossilOrigin-Name: ccee999649d0fa1d48e53847542f4cbe05e3d694

11 years agoFix a buffer overread during compilation of CREATE VIRTUAL TABLE statements that...
dan [Thu, 27 Nov 2014 11:36:36 +0000 (11:36 +0000)] 
Fix a buffer overread during compilation of CREATE VIRTUAL TABLE statements that featured an explicit database name but no virtual table arguments. For example, "CREATE VIRTUAL TABLE main.ft USING fts4".

FossilOrigin-Name: f095cde579e7417306e11b5c1d2dd90b6bb547d5

11 years agoMore test cases for the balancer.
drh [Thu, 27 Nov 2014 04:23:19 +0000 (04:23 +0000)] 
More test cases for the balancer.

FossilOrigin-Name: 358ea818f7ea5aa55bafaf4057e9fc7a5fd77c11

11 years agoFix a problem in the new b-tree balancer that was causing corruption of
drh [Thu, 27 Nov 2014 03:46:04 +0000 (03:46 +0000)] 
Fix a problem in the new b-tree balancer that was causing corruption of
the fragmentation count.

FossilOrigin-Name: f242394e079dd185aad90f2aee902a5edf27e150

11 years agoFix an integer overflow bug in vdbesort.c.
dan [Tue, 25 Nov 2014 18:59:55 +0000 (18:59 +0000)] 
Fix an integer overflow bug in vdbesort.c.

FossilOrigin-Name: 623827192532f08b68bc0eb9ed1449e173361f0c

11 years agoAdd the auxiliary highlight() function to fts5.
dan [Mon, 24 Nov 2014 16:24:33 +0000 (16:24 +0000)] 
Add the auxiliary highlight() function to fts5.

FossilOrigin-Name: 059092379f981eb919b500ce447006f9e645fc5a

11 years agoAlways reinitialized the Index.bUnordered and Index.noSkipscan flags before
drh [Sat, 22 Nov 2014 21:37:00 +0000 (21:37 +0000)] 
Always reinitialized the Index.bUnordered and Index.noSkipscan flags before
rereading the sqlite_stat1 table, even if SQLITE_ENABLE_STAT4 is defined.

FossilOrigin-Name: 1e1221fc4823a6bb6fc5d2408732e27aca585de9

11 years agoFix an error in the comments from the previous check-in.
drh [Sat, 22 Nov 2014 19:52:10 +0000 (19:52 +0000)] 
Fix an error in the comments from the previous check-in.

FossilOrigin-Name: 9660ce541837ccd8df415641a922274e093056aa

11 years agoDeploy heuristics (well-commented) to better estimate how much unindexed terms
drh [Sat, 22 Nov 2014 18:50:44 +0000 (18:50 +0000)] 
Deploy heuristics (well-commented) to better estimate how much unindexed terms
in the WHERE clause filter the number of output rows from a single table.

FossilOrigin-Name: 221659945c3f78d3b6789bfe8fdeb8d3ee1fa038

11 years agoRemove a redundant test case (probably a copy/paste error). Add an assert()
drh [Sat, 22 Nov 2014 12:22:13 +0000 (12:22 +0000)] 
Remove a redundant test case (probably a copy/paste error).  Add an assert()
to where.c to ensure that automatic indexes do not have there output row
counts adjusted downward by supplementary constraints.

FossilOrigin-Name: eea47933493c85a85247ad383bd148b06f627d04

11 years agoAdd SQLITE_ENABLE_OTA pre-processor directives so that this branch may be compiled...
dan [Sat, 22 Nov 2014 09:09:50 +0000 (09:09 +0000)] 
Add SQLITE_ENABLE_OTA pre-processor directives so that this branch may be compiled with or without OTA.

FossilOrigin-Name: 600cefdd4d29c1de4d107fa7ddeb76a18edce4f5

11 years agoMerge latest trunk changes with this branch.
dan [Fri, 21 Nov 2014 14:37:24 +0000 (14:37 +0000)] 
Merge latest trunk changes with this branch.

FossilOrigin-Name: 7ef44c5b5bd30bcc4ef59ed172b9ce9ac6a843f6

11 years agoChanges to comments in sqlite3ota.h.
dan [Fri, 21 Nov 2014 11:22:11 +0000 (11:22 +0000)] 
Changes to comments in sqlite3ota.h.

FossilOrigin-Name: 14139542b68fbf01632a1b149cd6fca4bb01efa6

11 years agoAdd support for updating virtual tables via ota.
dan [Fri, 21 Nov 2014 10:46:23 +0000 (10:46 +0000)] 
Add support for updating virtual tables via ota.

FossilOrigin-Name: 4dfcfe543945aa60a7ac397a3bdb0ac9e20ef7b6

11 years agoFix a typo in a requirements mark on the abs() SQL function.
drh [Thu, 20 Nov 2014 23:21:23 +0000 (23:21 +0000)] 
Fix a typo in a requirements mark on the abs() SQL function.

FossilOrigin-Name: b1e6c02f8b9a2afaa12ac15a33e3f698c3be27d6

11 years agoFix a benign test error on PRAGMA collation_list
drh [Thu, 20 Nov 2014 23:11:30 +0000 (23:11 +0000)] 
Fix a benign test error on PRAGMA collation_list
introduced by a recent checkin.

FossilOrigin-Name: 332cc9591d05508ac9cb56fde2b82e20e0342d1f

11 years agoUpdates to requirements tags on the mutex documentation.
drh [Thu, 20 Nov 2014 23:03:42 +0000 (23:03 +0000)] 
Updates to requirements tags on the mutex documentation.

FossilOrigin-Name: fcf8b7e4c6c3893e2004a28dc9f0f677907b4ba9

11 years agoAdd requirements marks on the built-in collating functions.
drh [Thu, 20 Nov 2014 19:22:26 +0000 (19:22 +0000)] 
Add requirements marks on the built-in collating functions.

FossilOrigin-Name: 4b608b62ac8d4eafdb76192b3b5db272332a4bfd

11 years agoAdd the "ota_delta()" feature for delta-compressed updates.
dan [Thu, 20 Nov 2014 19:19:02 +0000 (19:19 +0000)] 
Add the "ota_delta()" feature for delta-compressed updates.

FossilOrigin-Name: c64dcd1788f5cc7db197a0ec4ab0981f34a72c6b

11 years agoUpdate the ota extension so that it can be used to update tables with external PRIMAR...
dan [Thu, 20 Nov 2014 17:37:08 +0000 (17:37 +0000)] 
Update the ota extension so that it can be used to update tables with external PRIMARY KEY indexes.

FossilOrigin-Name: 55066a1171cbd3077f5e6c8ceb2745e810d9476e

11 years agoEnsure that when the number of cells on a page drops to zero that the freelist
drh [Thu, 20 Nov 2014 15:30:50 +0000 (15:30 +0000)] 
Ensure that when the number of cells on a page drops to zero that the freelist
and fragment counter are both cleared.  Also add evidence marks corresponding
to file-format documentation.

FossilOrigin-Name: ef9fbc08b0a047042deeb2d6007d67028fefb9e2

11 years agoUpdates to support zipvfs in pass-through mode.
dan [Thu, 20 Nov 2014 15:11:12 +0000 (15:11 +0000)] 
Updates to support zipvfs in pass-through mode.

FossilOrigin-Name: 556c3de53ad33d11d33ec794345c2100aa76f3e1

11 years agoFix the encoding of some integers to use the minimum amount of space:
drh [Thu, 20 Nov 2014 02:58:10 +0000 (02:58 +0000)] 
Fix the encoding of some integers to use the minimum amount of space:
-128, -32768, -8388608, -217483648, and -140737488355328.

FossilOrigin-Name: 2d7c8da5f16e64eaa7b0c2d66898682ea3d102a0

11 years agoAdd some requirements marks to the record formatting logic. Comment changes
drh [Thu, 20 Nov 2014 02:18:14 +0000 (02:18 +0000)] 
Add some requirements marks to the record formatting logic.  Comment changes
only - the code is unaltered.

FossilOrigin-Name: 9a9627e178a67bbfc85366aaea900e674d22fb53

11 years agoAdd new requirements marks associated with the file format documentation.
drh [Wed, 19 Nov 2014 16:36:25 +0000 (16:36 +0000)] 
Add new requirements marks associated with the file format documentation.
No changes to code.

FossilOrigin-Name: 6d00bcca6ed1903fb17275752cab71c14392355b

11 years agoCompletely remove an assert() that had previously been commented out.
drh [Wed, 19 Nov 2014 14:31:12 +0000 (14:31 +0000)] 
Completely remove an assert() that had previously been commented out.

FossilOrigin-Name: 89b3c1c4555c98c633089b21cdd2a1a3a1e751eb

11 years agoAdd an ALWAYS on an always-true branch in wal.c.
drh [Wed, 19 Nov 2014 14:05:41 +0000 (14:05 +0000)] 
Add an ALWAYS on an always-true branch in wal.c.
Fix the ANALYZE command so that it resets the "unordered" and "noskipscan"
flags on indices when reloading the sqlite_stat1 table.

FossilOrigin-Name: 9ed97a85feee6593faefa2b54cc4cf9a60f515f9

11 years agoAdding the "noskipscan" token to an sqlite_stat1.stat field prevents
drh [Tue, 18 Nov 2014 21:54:31 +0000 (21:54 +0000)] 
Adding the "noskipscan" token to an sqlite_stat1.stat field prevents
an index for being used with the skip-scan algorithm.

FossilOrigin-Name: 4461bf045d8eecf98478035efcdba3f41c709bc5

11 years agoAllow an automatic index to be used if the only uses of declared indexes for
drh [Tue, 18 Nov 2014 21:45:35 +0000 (21:45 +0000)] 
Allow an automatic index to be used if the only uses of declared indexes for
the same loop use the skip-scan algorithm.

FossilOrigin-Name: c52f7971e90cac1058d6b66c9e334cbc8607def3

11 years agoMerge recent trunk enhancements, including the read-after-ROLLBACK change
drh [Tue, 18 Nov 2014 21:20:57 +0000 (21:20 +0000)] 
Merge recent trunk enhancements, including the read-after-ROLLBACK change
and the addition of sqlite3_stmt_scanstatus() support, as well as various
minor bug fixes.

FossilOrigin-Name: f09055f3c4348264c7336f90646375f0d98b061e

11 years agoMerge in all the other ROLLBACK fixes from the branch-3.8.7 branch.
drh [Tue, 18 Nov 2014 20:49:30 +0000 (20:49 +0000)] 
Merge in all the other ROLLBACK fixes from the branch-3.8.7 branch.
I don't know why I was doing them one-by-one.

FossilOrigin-Name: 296b0c7397790ceadbdb330959e962f6491abc3e

11 years agoFix a bug in the sqlite3TripAllCursors() routine that prevents it from
drh [Tue, 18 Nov 2014 20:22:05 +0000 (20:22 +0000)] 
Fix a bug in the sqlite3TripAllCursors() routine that prevents it from
reporting errors.  It is unknown at this time whether or not this omission can
result in any incorrect result in an actual query.

FossilOrigin-Name: 2896f2640ab3e102ee248d20fb68c497817524eb

11 years agoUpdate a couple of test cases to account for the fact that ROLLBACK does not always...
drh [Tue, 18 Nov 2014 20:16:27 +0000 (20:16 +0000)] 
Update a couple of test cases to account for the fact that ROLLBACK does not always abort all running SELECT statements.

FossilOrigin-Name: abccda769a3f6b755c3bf70b5fb31a5e16718ef3

11 years agoIncrement the version number to 3.8.7.2
drh [Tue, 18 Nov 2014 12:28:52 +0000 (12:28 +0000)] 
Increment the version number to 3.8.7.2

FossilOrigin-Name: 945a9e687fdfee5f7103d85d131024e85d594ac3

11 years agoAdd an ALWAYS() to an always-true conditional in the WAL rollback logic.
drh [Tue, 18 Nov 2014 02:44:32 +0000 (02:44 +0000)] 
Add an ALWAYS() to an always-true conditional in the WAL rollback logic.

FossilOrigin-Name: c5eae8a60d474131fbfa4d0c2b459005267e8be4

11 years agoRemove code from sqlite3BtreeKeySize() made unreachable by the previous
drh [Mon, 17 Nov 2014 20:33:07 +0000 (20:33 +0000)] 
Remove code from sqlite3BtreeKeySize() made unreachable by the previous
check-in.

FossilOrigin-Name: 57c4aa988c8eda3cc513c1e5df5804d88bee99a0

11 years agoAvoid calling sqlite3BtreeKeysize() on a b-tree cursor in SKIPNEXT or SKIPPREV state.
dan [Mon, 17 Nov 2014 19:44:44 +0000 (19:44 +0000)] 
Avoid calling sqlite3BtreeKeysize() on a b-tree cursor in SKIPNEXT or SKIPPREV state.

FossilOrigin-Name: 2f2ecb994889acb783616acb7307f8fed962d213

11 years agoAvoid calling sqlite3BtreeKeysize() on a b-tree cursor in SKIPNEXT or SKIPPREV state.
dan [Mon, 17 Nov 2014 19:42:48 +0000 (19:42 +0000)] 
Avoid calling sqlite3BtreeKeysize() on a b-tree cursor in SKIPNEXT or SKIPPREV state.

FossilOrigin-Name: 54e7d3fcb1ab21c03ffef1af93ae029a2901098a

11 years agoImproved comments on the BtCursor.skipNext field. No changes to code.
drh [Mon, 17 Nov 2014 19:25:15 +0000 (19:25 +0000)] 
Improved comments on the BtCursor.skipNext field.  No changes to code.

FossilOrigin-Name: e956e7db057d1112badf5e0671cea95201385b44

11 years agoAdd tests for WITHOUT ROWID tables with composite primary keys.
dan [Mon, 17 Nov 2014 18:35:30 +0000 (18:35 +0000)] 
Add tests for WITHOUT ROWID tables with composite primary keys.

FossilOrigin-Name: 712d413d29950b19d4afb18cfcf9d3afb302d0a0

11 years agoChanges so that sqlite3_ckpt_open() works with zipvfs databases.
dan [Mon, 17 Nov 2014 17:57:06 +0000 (17:57 +0000)] 
Changes so that sqlite3_ckpt_open() works with zipvfs databases.

FossilOrigin-Name: acbed3380d8a35bf2f1ec133540cb5e9fccb9b42

11 years agoWhen a SELECT statement is terminated by a ROLLBACK TO operation, make the
drh [Mon, 17 Nov 2014 17:13:06 +0000 (17:13 +0000)] 
When a SELECT statement is terminated by a ROLLBACK TO operation, make the
error message be "abort due to ROLLBACK" rather than
"callback requested query abort".

FossilOrigin-Name: 34fc4a082c192830e48f643549c04a4f91912b8b

11 years agoFix a bug in the sqlite3TripAllCursors() routine that prevents it from
drh [Mon, 17 Nov 2014 15:32:47 +0000 (15:32 +0000)] 
Fix a bug in the sqlite3TripAllCursors() routine that prevents it from
reporting errors.  It is unknown at this time whether or not this omission can
result in any incorrect result in an actual query.

FossilOrigin-Name: 42588207ff5451cb785c394633e1ab631fb82f01

11 years agoUpdate a couple of test cases to account for the fact that ROLLBACK does not always...
dan [Mon, 17 Nov 2014 15:22:08 +0000 (15:22 +0000)] 
Update a couple of test cases to account for the fact that ROLLBACK does not always abort all running SELECT statements.

FossilOrigin-Name: eba171e980fa4491dfee9d7e4df50c87a0ebbf87

11 years agoFix a problem with the parameters to an OP_Affinity in one of the VM programs generat...
dan [Mon, 17 Nov 2014 15:07:40 +0000 (15:07 +0000)] 
Fix a problem with the parameters to an OP_Affinity in one of the VM programs generated by sqlite3_index_writer() that was causing an OOB read.

FossilOrigin-Name: 447b33b34a9836992f5a8d50cd8647a10435c144

11 years agoFix the customization interfaces so that they match the documentation.
dan [Sat, 15 Nov 2014 20:07:31 +0000 (20:07 +0000)] 
Fix the customization interfaces so that they match the documentation.

FossilOrigin-Name: fba0b5fc7eead07a4853e78e02d788e7c714f6cd

11 years agoAdding the "noskipscan" token to an sqlite_stat1.stat field prevents an noskipscan-token
drh [Sat, 15 Nov 2014 19:08:13 +0000 (19:08 +0000)] 
Adding the "noskipscan" token to an sqlite_stat1.stat field prevents an
index for being used with the skip-scan algorithm.

FossilOrigin-Name: 00fe09505792cd0d104b2da9d040f023e30fa871

11 years agoConsider using an automatic-index for a scan even if there exists a possible skip... experimental-autoindex-fix
dan [Fri, 14 Nov 2014 19:34:20 +0000 (19:34 +0000)] 
Consider using an automatic-index for a scan even if there exists a possible skip-scan that uses one or more "=" operators.

FossilOrigin-Name: 93642a65ef3d53ece322ffd85233b68fc9a86c9d

11 years agoDo not automatically remove the DISTINCT keyword from "a IN (SELECT DISTINCT ......
drh [Fri, 14 Nov 2014 15:42:23 +0000 (15:42 +0000)] 
Do not automatically remove the DISTINCT keyword from "a IN (SELECT DISTINCT ...)" expressions. Fix for [db87229497].

FossilOrigin-Name: 98457a57d642b35917eb9ad8f70065e273aad206

11 years agoDo not automatically remove the DISTINCT keyword from "a IN (SELECT DISTINCT ......
dan [Fri, 14 Nov 2014 15:28:33 +0000 (15:28 +0000)] 
Do not automatically remove the DISTINCT keyword from "a IN (SELECT DISTINCT ...)" expressions. Fix for [db87229497].

FossilOrigin-Name: 55e453aadbb676dda07f0fa537d39ce184ef636c