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.
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.
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.
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".
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.
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.
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.
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.
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.
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".
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.
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.
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]
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.