drh [Tue, 6 Mar 2018 21:43:19 +0000 (21:43 +0000)]
Improved documentation for sqlite3_serialize() and sqlite3_deserialize().
Change the name of the compile-time option to enable these interfaces
from SQLITE_ENABLE_MEMDB to SQLITE_ENABLE_DESERIALIZE.
dan [Tue, 6 Mar 2018 11:46:34 +0000 (11:46 +0000)]
Avoid running a couple of tests in crash8.test that depend on the presence of
the journal file if running on an F2FS file-system that does not require a
journal file.
drh [Mon, 5 Mar 2018 23:23:28 +0000 (23:23 +0000)]
Fix walIteratorInit() so that it always leaves the iterator as a NULL pointer
if an OOM occurs. This fixes an assertion fault introduced by
check-in [044b0b65e716bff].
drh [Mon, 5 Mar 2018 20:20:22 +0000 (20:20 +0000)]
A new way of doing archive commands on the command-line for the CLI. The -A
option means that everything that follows is a ".archive" command, including
any suffix on the -A option.
dan [Fri, 2 Mar 2018 15:42:20 +0000 (15:42 +0000)]
Optimize the obscure case of running a checkpoint against a very large wal
file for which a large percentage of the frames have already been checkpointed.
drh [Tue, 27 Feb 2018 15:40:59 +0000 (15:40 +0000)]
Add support for TRUE and FALSE keywords and for operators IS TRUE, IS FALSE,
IS NOT TRUE, and IS NOT FALSE. If there is are columns named TRUE or FALSE,
then the keywords resolve to the column names, for compatibility. The
behavior of the "DEFAULT true" phrase is changed to mean what it says,
rather than being an alias for "DEFAULT 'true'".
drh [Tue, 20 Feb 2018 17:02:31 +0000 (17:02 +0000)]
In the speed-check.sh script, make WAL mode the default. Add the --legacy
option to do DELETE mode. Continue to use DELETE mode for long-term performance
graphs since WAL mode was not always available, but use WAL mode for
day-to-day performance measurements.
drh [Tue, 20 Feb 2018 15:23:37 +0000 (15:23 +0000)]
Optimize calls to sqlite3_mprintf("%z...") so that they attempt to append
text onto the end of the existing memory allocation rather than reallocating
and copying.
drh [Tue, 20 Feb 2018 13:46:20 +0000 (13:46 +0000)]
Remove a lot of the text describing extended format options from the
documentation on sqlite3_mprintf() and friends, since that information is
now covered by the separate printf.html document. Provide links to that
other document. No changes to code.
drh [Mon, 19 Feb 2018 22:46:19 +0000 (22:46 +0000)]
Enhance the string formatter (used by printf()) so that the width and
precision of string substitution operators refer to characters instead of
bytes when the alternate-form-2 flag ("!") is used. Also fix the %c
substition to always work within unicode, regardless of the
alternate-form-2 flag.
drh [Mon, 19 Feb 2018 17:03:23 +0000 (17:03 +0000)]
In the printf() library, measure width and precision in characters rather
than bytes if the "!" (alternate-form-2) flag is present on a %s or %z
substitution.
drh [Mon, 19 Feb 2018 13:53:56 +0000 (13:53 +0000)]
Fix an assert so that it compares two CellInfo objects field by field
instead of using memcmp(). Memcmp() does not work on x86
because of uninitialized padding bytes.
drh [Sun, 18 Feb 2018 17:50:03 +0000 (17:50 +0000)]
Fix a memory leak in the processing of nested row values. This problem has
existed every since row values support was added (version 3.15.0, 2016-10-14)
but was only just now detected by OSSFuzz.
dan [Sat, 17 Feb 2018 07:38:50 +0000 (07:38 +0000)]
Fix a data race causing a tsan complaint with SQLITE_ENABLE_API_ARMOR builds
on unix. The race condition is not dangerous in practice, it just upsets tsan.
drh [Thu, 15 Feb 2018 21:00:37 +0000 (21:00 +0000)]
Do not allow parameters or schema references inside of WITH clause of
triggers and views. This fixes a bug discovered by OSSFuzz and present
since common-table-expressions were first added in 2014-02-03.
drh [Tue, 13 Feb 2018 18:48:08 +0000 (18:48 +0000)]
Fix an incorrect table lookup used to find the appropriate search operator
for a WHERE clause on a row-value inequality. The incorrect table lookup
was causing an incorrect answer for the less-than operator.
Fix for ticket [f484b65f3d6230593c34f11]
dan [Tue, 13 Feb 2018 16:21:32 +0000 (16:21 +0000)]
Ensure that multiple updates of the same FTS4 row (i.e. the row with the same
rowid) within a single transaction are written to separate segments. Fix for
[d6ec09ec].
drh [Mon, 12 Feb 2018 20:27:34 +0000 (20:27 +0000)]
When compiling with VDBE_PROFILE, add the sqlite3NProfileCnt global variable
which can be used to measure per-opcode values other than elapse time, if
non-zero.
drh [Mon, 12 Feb 2018 13:30:34 +0000 (13:30 +0000)]
Fix a possible infinite loop in VACUUM that can come up when the schema
has been carefully corrupted. Problem discovered by OSSFuzz. Test cases
in TH3.
drh [Fri, 9 Feb 2018 23:25:14 +0000 (23:25 +0000)]
Improve the performance of the built-in REPLACE() function in cases where
it does many substitutions that make the string larger. OSSFuzz is reporting
intermittant timeouts when running a test where it does a REPLACE() on a
930KB random blob. Perhaps this enhancement will fix that.
dan [Wed, 7 Feb 2018 18:02:50 +0000 (18:02 +0000)]
In extensions rtree, fts3 and fts5, ensure that when dynamic buffers are bound
to persistent SQL statements using SQLITE_STATIC, the binding is replaced with
an SQL NULL before the buffer is freed. Otherwise, a user may obtain a pointer
to the persistent statement using sqlite3_next_stmt() and attempt to access
the freed buffer using sqlite3_expanded_sql() or similar.
dan [Wed, 7 Feb 2018 16:14:41 +0000 (16:14 +0000)]
When the final connection disconnects from a wal mode database, check that the
database file has not been moved or unlinked before deleting the wal and shm
files.