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.
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.
drh [Fri, 31 Oct 2014 00:05:23 +0000 (00:05 +0000)]
In the balance_nonroot() routine, protect the values in aPgno[] array from
change during the page sort, so that aPgno[] can be used to avoid unnecessary
pointer-map updates for auto_vacuum databases.
drh [Thu, 30 Oct 2014 23:14:56 +0000 (23:14 +0000)]
Improvements to the wording of some comments. Reinstate an assert() that
is only true for non-corrupt database files by adding an "|| CORRUPT_DB" term.
drh [Wed, 29 Oct 2014 00:58:38 +0000 (00:58 +0000)]
In the OP_Column opcode, when extracting a field that is past the end of
a short record (because the row was originally inserted prior to ALTER TABLE
ADD COLUMN) then make sure the output register is fully NULL and does not
contain leftover flags (such as MEM_Ephem) from its previous use.
Fix for ticket [43107840f1c02].
dan [Tue, 28 Oct 2014 16:50:10 +0000 (16:50 +0000)]
Fix a crash that could occur if the WHERE clause of an UPDATE statement on a view that does not feature a column named "rowid" contains a term such as "rowid=?".
drh [Mon, 27 Oct 2014 18:34:07 +0000 (18:34 +0000)]
Add the SQLITE_ENABLE_API_ARMOR compile-time option for extra API parameter
validation. Enhance sqlite3_stricmp(), sqlite3_strnicmp(), and
sqlite3_uri_parameter() for improved NULL parameter handling.
dan [Mon, 27 Oct 2014 08:02:16 +0000 (08:02 +0000)]
If a free-slot is found within a page, but using that free-slot would fragment the page further and there are already at least 60 fragmented bytes, degragment the page. This matches the behaviour of the trunk.
drh [Sat, 25 Oct 2014 13:42:16 +0000 (13:42 +0000)]
Increase the resolution of the second parameter to the likelihood() SQL
function (the probability value) so that it can handle probabilities
as small as 0.00000001. Formerly, it ran out of precision at 0.001.
drh [Sat, 25 Oct 2014 12:28:25 +0000 (12:28 +0000)]
Do not use virtual (and hence redundant) WHERE-clause terms to restrict the
content of a automatic partial index. Show when an automatic partial index
is used in the EXPLAIN QUERY PLAN output.
dan [Fri, 24 Oct 2014 20:57:03 +0000 (20:57 +0000)]
Ensure that the "Any prior cache entry associated with newKey is guaranteed not to be pinned" guarantee made to xRekey implementations is not violated.
drh [Wed, 22 Oct 2014 19:57:16 +0000 (19:57 +0000)]
Change the 0x800 bit of SQLITE_TESTCTRL_OPTIMIZATIONS so that it disables
the loading of STAT3 and STAT4 content, not just the using of that content.
Change the internal name of that bit to SQLITE_Stat34.
drh [Wed, 22 Oct 2014 15:27:05 +0000 (15:27 +0000)]
Take steps to avoid misestimating range query costs based on STAT4 data
due to the roundoff error of converting from integers to LogEst and back
to integers.
drh [Tue, 21 Oct 2014 21:56:06 +0000 (21:56 +0000)]
Call fsync() right after ftruncate() when in journal_mode=TRUNCATE and
when synchronous=FULL in order to ensure that transactions are durable
across a power loss that happens moments after the commit. Proposed
fix for [https://bugzilla.mozilla.org/show_bug.cgi?id=1072773].