]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 years agoModify the documentation for sqlite3_backup_init() to indicate that it will fail...
dan [Thu, 13 Nov 2014 14:30:56 +0000 (14:30 +0000)] 
Modify the documentation for sqlite3_backup_init() to indicate that it will fail if there is already a read or read-write transaction open on the destination database.

FossilOrigin-Name: ef03a203351a6002e2b1075139717e4234c816cd

10 years agoHave calls to sqlite3_backup_init() fail if there is already a read or read-write...
dan [Thu, 13 Nov 2014 14:18:25 +0000 (14:18 +0000)] 
Have calls to sqlite3_backup_init() fail if there is already a read or read-write transaction open on the destination database.

FossilOrigin-Name: 169b5505498c0a7ee2b5dbb2ba13c41dfaa7c62f

10 years agoWhen a transaction or savepoint rollback occurs, save the positions of all open read...
drh [Thu, 13 Nov 2014 13:42:39 +0000 (13:42 +0000)] 
When a transaction or savepoint rollback occurs, save the positions of all open read-cursors so that they can be restored following the rollback operation.  Cherry-pick of check-in [dd03a2802f3f27]

FossilOrigin-Name: 402780a9c8df9e7ea898bdca49c1191042fe387a

10 years agoAdd further tests for rollback operations in the presence of ongoing selects.
dan [Wed, 12 Nov 2014 17:45:37 +0000 (17:45 +0000)] 
Add further tests for rollback operations in the presence of ongoing selects.

FossilOrigin-Name: eaf3aae014f59c8d37aa20aa31d54cf13f9e86fc

10 years agoWhen a transaction or savepoint rollback occurs, save the positions of all open read...
dan [Wed, 12 Nov 2014 14:56:02 +0000 (14:56 +0000)] 
When a transaction or savepoint rollback occurs, save the positions of all open read-cursors so that they can be restored following the rollback operation.

FossilOrigin-Name: dd03a2802f3f276525f3cef9a93f825dd8606626

10 years agoFix the %c format character in sqlite3VXPrintf() so that it correctly handles precisi...
drh [Wed, 12 Nov 2014 14:12:28 +0000 (14:12 +0000)] 
Fix the %c format character in sqlite3VXPrintf() so that it correctly handles precisions larger than 70.

FossilOrigin-Name: 839a6df9f98b90fb593534a62145d9c913540bae

10 years agoMake sure that NULL results from OP_Column are fully and completely NULL and do not...
drh [Wed, 12 Nov 2014 14:07:28 +0000 (14:07 +0000)] 
Make sure that NULL results from OP_Column are fully and completely NULL and do not have the MEM_Ephem bit set. Fix for ticket [094d39a4c95ee4].

FossilOrigin-Name: e1017745e183f5d7429ce787ec2feef946a24f0f

10 years agoThis is a cherry-pick of version [b5df5ac052].
drh [Tue, 11 Nov 2014 22:55:26 +0000 (22:55 +0000)] 
This is a cherry-pick of version [b5df5ac052].

FossilOrigin-Name: d4b2d5d066891e06f2bf4337902b44b000fa9fd2

10 years agoRemove some calls to the 'breakpoint' test command.
mistachkin [Tue, 11 Nov 2014 19:07:56 +0000 (19:07 +0000)] 
Remove some calls to the 'breakpoint' test command.

FossilOrigin-Name: 1412fcc480799ecbd68d44dd18d5bad40e20ccf1

10 years agoAdd tests for sqlite3_blob_bytes().
dan [Tue, 11 Nov 2014 16:11:04 +0000 (16:11 +0000)] 
Add tests for sqlite3_blob_bytes().

FossilOrigin-Name: a066a3832a7c6de65c3016e77e49ac00e09db749

10 years agoPermit read operations to continue after a ROLLBACK as long as the schema
drh [Tue, 11 Nov 2014 14:59:31 +0000 (14:59 +0000)] 
Permit read operations to continue after a ROLLBACK as long as the schema
does not change.

FossilOrigin-Name: b5df5ac0529f7b0d1e880a7f4a307e7d77b7fa6c

10 years agoAdd new test file e_blobclose.test, containing tests for sqlite3_blob_close().
dan [Tue, 11 Nov 2014 12:20:35 +0000 (12:20 +0000)] 
Add new test file e_blobclose.test, containing tests for sqlite3_blob_close().

FossilOrigin-Name: 5a1eac2419b1462e6f21595a3fff26d9cc49d203

10 years agoExperimental changes that permit read operations to continue after a read-after-rollback
drh [Tue, 11 Nov 2014 01:33:57 +0000 (01:33 +0000)] 
Experimental changes that permit read operations to continue after a
ROLLBACK, as long as the schema is unchanged.

FossilOrigin-Name: fa6e6a9ae276cad60e9a4abc1bc23cf2809ea786

10 years agoNew test cases for deleting content out from under a SELECT statement.
drh [Mon, 10 Nov 2014 19:16:59 +0000 (19:16 +0000)] 
New test cases for deleting content out from under a SELECT statement.

FossilOrigin-Name: 8289c3e9b47f7c2a606a88839f6bf615f8904ac2

10 years agoAdd test file e_blobwrite.test, containing tests for the sqlite3_blob_write() interface.
dan [Mon, 10 Nov 2014 17:53:03 +0000 (17:53 +0000)] 
Add test file e_blobwrite.test, containing tests for the sqlite3_blob_write() interface.

FossilOrigin-Name: 1df77e5f1bd82de4dc92fe28359c3e56ab3f9ed4

10 years agoAdd the eval() SQL function extension in ext/misc/eval.c.
drh [Mon, 10 Nov 2014 16:49:56 +0000 (16:49 +0000)] 
Add the eval() SQL function extension in ext/misc/eval.c.

FossilOrigin-Name: 27cf665b957f2c0ced403e3032099e80c295598f

10 years agoShorten over-length source code lines in shell.c.
drh [Mon, 10 Nov 2014 14:42:28 +0000 (14:42 +0000)] 
Shorten over-length source code lines in shell.c.

FossilOrigin-Name: 7f3819f6422badd344c1264b0cd2f2c7afe077df

10 years agoAdd new test file e_blobopen.test, containing tests for sqlite3_blob_open().
dan [Fri, 7 Nov 2014 14:41:11 +0000 (14:41 +0000)] 
Add new test file e_blobopen.test, containing tests for sqlite3_blob_open().

FossilOrigin-Name: ecbccd0e594d22b3ae7fabc8037951dc49570bc3

10 years agoFix another harmless comment typo.
drh [Fri, 7 Nov 2014 14:37:32 +0000 (14:37 +0000)] 
Fix another harmless comment typo.

FossilOrigin-Name: b45bc80bb16f07192d84fd14433bb724a84d4146

10 years agoIn the ".scanstats on" output from the shell, round the estRows value to
drh [Fri, 7 Nov 2014 13:52:44 +0000 (13:52 +0000)] 
In the ".scanstats on" output from the shell, round the estRows value to
the nearest integer, rather than rounding toward zero.

FossilOrigin-Name: 5700508535c35ac6b158b527e1d47e529e8e28ab

10 years agoFix harmless typos in comments.
drh [Fri, 7 Nov 2014 13:24:29 +0000 (13:24 +0000)] 
Fix harmless typos in comments.

FossilOrigin-Name: 94c564da4c2cf5dffe58fdf7a180e9ba4cc3de69

10 years agoFix typo in sqlite3.h reported on the mailing list.
drh [Fri, 7 Nov 2014 11:39:16 +0000 (11:39 +0000)] 
Fix typo in sqlite3.h reported on the mailing list.

FossilOrigin-Name: 402703212a8488f8b571ce170b3b6c7374bd7daa

10 years agoUpdate documentation on sqlite3_config() and add corresponding evidence marks.
drh [Fri, 7 Nov 2014 01:43:56 +0000 (01:43 +0000)] 
Update documentation on sqlite3_config() and add corresponding evidence marks.

FossilOrigin-Name: 360c8ca11c3315c8e08c7c52ff5468e3f723e562

10 years agoAdded SQLITE_SCANSTAT_SELECTID. Change the value returned by
drh [Thu, 6 Nov 2014 14:43:53 +0000 (14:43 +0000)] 
Added SQLITE_SCANSTAT_SELECTID.  Change the value returned by
SQLITE_SCANSTAT_EST from sqlite3_int64 to double.  Enhanced the formatting
and display of scan statistics using the ".scanstats on" command in the
shell.

FossilOrigin-Name: 20c7614addb8494cd7f40263a50fa6f428cce1c7

10 years agoFurther improvements to the ".scanstats on" display in the shell. Be sure scanstatus
drh [Thu, 6 Nov 2014 12:46:16 +0000 (12:46 +0000)] 
Further improvements to the ".scanstats on" display in the shell.  Be sure
to show the results of all subqueries even if there are gaps in the
SELECTID values.  Add ".scanstats" to the ".help" output.

FossilOrigin-Name: ee922682bb7235dbcd23a22fcfdfa188f6d3228a

10 years agoOn the ".scanstats on" output in the shell, initialize the estimated count for
drh [Thu, 6 Nov 2014 12:17:24 +0000 (12:17 +0000)] 
On the ".scanstats on" output in the shell, initialize the estimated count for
the first loop of each subquery to the actual loop count.

FossilOrigin-Name: d1c51c8455d5ce972a77720c2d56228646ced27c

10 years agoChanges the formatting of ".scanstats on" in the shell so that the stats for
drh [Thu, 6 Nov 2014 12:08:21 +0000 (12:08 +0000)] 
Changes the formatting of ".scanstats on" in the shell so that the stats for
subqueries are grouped together and occur after the main query.

FossilOrigin-Name: eacbbd8849db9b023eff15ef1cb42ec941299433

10 years agoAdd the SQLITE_SCANSTAT_SELECTID metric. Use it to improve the
drh [Thu, 6 Nov 2014 04:42:20 +0000 (04:42 +0000)] 
Add the SQLITE_SCANSTAT_SELECTID metric.  Use it to improve the
".stmtscan on" output in the shell.

FossilOrigin-Name: 64ad5761a841f71530d41565b9fbe9d19c2d6aff

10 years agoChange the SQLITE_SCANSTAT_EST parameter so that it returns a double for
drh [Thu, 6 Nov 2014 03:55:10 +0000 (03:55 +0000)] 
Change the SQLITE_SCANSTAT_EST parameter so that it returns a double for
the estimated number of output rows per loop, rather than a 64-bit integer.
Revise the output format for the ".scanstats on" in the shell to make use
of this new capability.

FossilOrigin-Name: f9684000665ae7ef6f89c3773612b8286b8f545a

10 years agoFixes to the Windows VFS to allow memory mapped files to work without WAL support.
drh [Wed, 5 Nov 2014 21:34:56 +0000 (21:34 +0000)] 
Fixes to the Windows VFS to allow memory mapped files to work without WAL support.

FossilOrigin-Name: 272fddc14cc322655eeba670bc0f9fc30e5a804c

10 years agoFix harmless compiler warnings in the new balance_nonroot() routine.
drh [Wed, 5 Nov 2014 21:21:08 +0000 (21:21 +0000)] 
Fix harmless compiler warnings in the new balance_nonroot() routine.

FossilOrigin-Name: 83a1e5db926b3a6d40f4a5cf9a8e6852b9bac9ac

10 years agoChange the query planner to do a better job of estimating the number rows
drh [Wed, 5 Nov 2014 19:26:12 +0000 (19:26 +0000)] 
Change the query planner to do a better job of estimating the number rows
selected by a BETWEEN operator using STAT4 when both upper and lower bounds
are contained within the same sample.

FossilOrigin-Name: 2d36be5d9a1cdd4fd2d54fc4eeece32a81cbacc1

10 years agoMake sure that NULL results from OP_Column are fully and completely NULL
drh [Wed, 5 Nov 2014 15:57:39 +0000 (15:57 +0000)] 
Make sure that NULL results from OP_Column are fully and completely NULL
and do not have the MEM_Ephem bit set.  Fix for ticket [094d39a4c95ee4].

FossilOrigin-Name: 42705fd7d892c4fdfb95fbbb468c99569beece25

10 years agoAdd a test case to check that the previous commit is effective.
dan [Wed, 5 Nov 2014 14:19:05 +0000 (14:19 +0000)] 
Add a test case to check that the previous commit is effective.

FossilOrigin-Name: 948d6e5d07bc14b6de32ec2144c716a5532f894c

10 years agoEnhance whereLoopCheaperProperSubset(X,Y) so that it does not report true
drh [Wed, 5 Nov 2014 13:13:13 +0000 (13:13 +0000)] 
Enhance whereLoopCheaperProperSubset(X,Y) so that it does not report true
if X uses skip-scan less than Y, since in that case X might
deserve to be cheaper even if it is a proper subset.

FossilOrigin-Name: c106b755369c1f8546e897ecd2ac56fd09d6e885

10 years agoAdd the ".scanstats on" command to the shell tool. Executing this command causes...
dan [Wed, 5 Nov 2014 09:07:28 +0000 (09:07 +0000)] 
Add the ".scanstats on" command to the shell tool. Executing this command causes the shell tool to print values from sqlite3_stmt_scanstatus() after each query is run.

FossilOrigin-Name: 7974c0ed10ffdc960a43fed89845c2bed428958d

10 years agoImproved output formatting for the showstat4 tool.
drh [Tue, 4 Nov 2014 21:38:45 +0000 (21:38 +0000)] 
Improved output formatting for the showstat4 tool.

FossilOrigin-Name: 7df82c46da437bc743576358c25e758280067df8

10 years agoSkip tests that require WAL mode when it is not enabled. winMmapNoWal
mistachkin [Tue, 4 Nov 2014 19:52:15 +0000 (19:52 +0000)] 
Skip tests that require WAL mode when it is not enabled.

FossilOrigin-Name: 6fc4ead26d19b9348bbda34c3053ae1e066abc32

10 years agoFor the Win32 VFS, allow memory mapped files to work when compiled without WAL support.
mistachkin [Tue, 4 Nov 2014 19:37:22 +0000 (19:37 +0000)] 
For the Win32 VFS, allow memory mapped files to work when compiled without WAL support.

FossilOrigin-Name: 1fc7e2f3d34e25e7b59aa8b51d10c1e27ab4a527

10 years agoAdd various requirements evidence marks for sqlite3_config() options.
drh [Tue, 4 Nov 2014 17:23:24 +0000 (17:23 +0000)] 
Add various requirements evidence marks for sqlite3_config() options.

FossilOrigin-Name: d423349d2cd8bc7e04f3d90ca7bab11e1ad86e25

10 years agoChange the definition of SQLITE_CONFIG_SCRATCH so that at most one scratch
drh [Tue, 4 Nov 2014 14:22:27 +0000 (14:22 +0000)] 
Change the definition of SQLITE_CONFIG_SCRATCH so that at most one scratch
buffer is used per thread.  Use the generic heap memory allocator for the
WalIterator object when running a checkpoint.

FossilOrigin-Name: 391c9b85abcb5ba300fb2e116384639310c69ed2

10 years agoImproved documentation and addition of source-code evidence marks for the
drh [Tue, 4 Nov 2014 13:41:32 +0000 (13:41 +0000)] 
Improved documentation and addition of source-code evidence marks for the
sqlite3_config() interface.

FossilOrigin-Name: 681031a436fdd4cce426d6cd43cbae6b83167d26

10 years agoAdd the SQLITE_CONFIG_PCACHE_HDRSZ option for sqlite3_config().
drh [Tue, 4 Nov 2014 12:11:23 +0000 (12:11 +0000)] 
Add the SQLITE_CONFIG_PCACHE_HDRSZ option for sqlite3_config().

FossilOrigin-Name: 6eb03e62a34e8e0964175283587247b0212db604

10 years agoUpdates to the sqlite3_stmt_scanstatus() documentation. No changes to code.
drh [Mon, 3 Nov 2014 18:03:00 +0000 (18:03 +0000)] 
Updates to the sqlite3_stmt_scanstatus() documentation.  No changes to code.

FossilOrigin-Name: d97c324eb1d870c994911c53fbf84205f4e3e7a1

10 years agoAdd the experimental sqlite3_stmt_scanstatus() API. For comparing the number of rows...
dan [Mon, 3 Nov 2014 16:56:43 +0000 (16:56 +0000)] 
Add the experimental sqlite3_stmt_scanstatus() API. For comparing the number of rows actually visited by a loop with the estimate used by the query planner.

FossilOrigin-Name: ab3b0fc5760c6d428dbe1f974726a7d3526640bc

10 years agoFix a typo preventing this from building with SQLITE_ENABLE_STMT_SCANSTATUS defined.
dan [Mon, 3 Nov 2014 16:39:37 +0000 (16:39 +0000)] 
Fix a typo preventing this from building with SQLITE_ENABLE_STMT_SCANSTATUS defined.

FossilOrigin-Name: 4c5714ab3dba19513374c7b1478221a0b90b450c

10 years agoRefactor the interface to make it more easily extensible.
drh [Mon, 3 Nov 2014 16:35:55 +0000 (16:35 +0000)] 
Refactor the interface to make it more easily extensible.

FossilOrigin-Name: 7955342da4a35b57e4ae26690b8d40f7bba20e8f

10 years agoAdd further tests. Fixes so that compilation without ENABLE_STMT_SCANSTATUS works.
dan [Mon, 3 Nov 2014 15:33:17 +0000 (15:33 +0000)] 
Add further tests. Fixes so that compilation without ENABLE_STMT_SCANSTATUS works.

FossilOrigin-Name: a2303c719222f1effb51acc6b37930561148c00c

10 years agoUse exponential buffer size growth in StrAccum, as long as the size does not
drh [Mon, 3 Nov 2014 14:46:29 +0000 (14:46 +0000)] 
Use exponential buffer size growth in StrAccum, as long as the size does not
grow to large, to avoid excess memory allocation resize operations.  Also,
document the fact that setting scratch memory causes SQLite to try to avoid
large memory allocations.

FossilOrigin-Name: a518bc3318232d652349eb29303ff250aee40459

10 years agoWhen enlarging the size of a StrAccum object, use sqlite3DbMallocSize() to
drh [Mon, 3 Nov 2014 13:24:12 +0000 (13:24 +0000)] 
When enlarging the size of a StrAccum object, use sqlite3DbMallocSize() to
record the entire size of the allocation, not just the requested size.

FossilOrigin-Name: 3dda3c937469ce661d1cd0e8d8963a03e698ee39

10 years agoRemove unused variable from struct WhereInfo. Add some explanatory comments to new...
dan [Mon, 3 Nov 2014 11:25:32 +0000 (11:25 +0000)] 
Remove unused variable from struct WhereInfo. Add some explanatory comments to new code.

FossilOrigin-Name: f5313e0c680d9baebefb1cf50ddadedd4418a334

10 years agoMinor performance enhancements to SQLITE_ENABLE_STMT_SCANSTATUS code.
dan [Sat, 1 Nov 2014 21:00:04 +0000 (21:00 +0000)] 
Minor performance enhancements to SQLITE_ENABLE_STMT_SCANSTATUS code.

FossilOrigin-Name: f13d6ba8a72d75838c4aaf85326c1129da027f8b

10 years agoIf SQLITE_ENABLE_STMT_SCANSTATUS is defined, record the number of times each VDBE...
dan [Sat, 1 Nov 2014 20:38:06 +0000 (20:38 +0000)] 
If SQLITE_ENABLE_STMT_SCANSTATUS is defined, record the number of times each VDBE opcode is executed. Derive the values returned by sqlite3_stmt_scanstatus() from these records on demand.

FossilOrigin-Name: 9ea37422a8cc2fce51bb10508e5e90f40fd4b511

10 years agoAdd requirements marks and make minor tweaks to documentation.
drh [Sat, 1 Nov 2014 18:32:18 +0000 (18:32 +0000)] 
Add requirements marks and make minor tweaks to documentation.

FossilOrigin-Name: 49188b2bb53a92b0b0b6aaf8247edeb0c1bcd1f5

10 years agoMinor fixes and documentation improvements for sqlite3_stmt_scanstatus().
dan [Sat, 1 Nov 2014 18:08:04 +0000 (18:08 +0000)] 
Minor fixes and documentation improvements for sqlite3_stmt_scanstatus().

FossilOrigin-Name: 8d8cc9608d30bb65fffcfe488e904411cbbc7f41

10 years agoAdd the experimental sqlite3_stmt_scanstatus() API.
dan [Fri, 31 Oct 2014 20:11:32 +0000 (20:11 +0000)] 
Add the experimental sqlite3_stmt_scanstatus() API.

FossilOrigin-Name: 6a9bab34aeb6a01b612211a28c140de60a3e883c

10 years agoChange the command-line shell man-page to use the ".tr" troff directive
drh [Fri, 31 Oct 2014 14:46:51 +0000 (14:46 +0000)] 
Change the command-line shell man-page to use the ".tr" troff directive
instead of ".cc" for escaping the initial "." characters in the ".help"
output.

FossilOrigin-Name: 67f0d469da28c023200239a1f3d0c6cef9ef0e45

10 years agoSimplify the logic in the cell redistribution loop of balance_nonroot().
drh [Fri, 31 Oct 2014 14:26:36 +0000 (14:26 +0000)] 
Simplify the logic in the cell redistribution loop of balance_nonroot().
Enhance and clarify comments and add assert() statements for additional
verification of correctness.

FossilOrigin-Name: a07078b60007e88adea67bec5f0caf91f707ad78