dan [Thu, 16 Mar 2017 18:14:39 +0000 (18:14 +0000)]
If the user has not set it explicitly, set the "PRAGMA synchronous" setting to
SQLITE_DEFAULT_SYNCHRONOUS when a database connection changes from wal to
rollback journal mode.
drh [Mon, 13 Mar 2017 19:26:34 +0000 (19:26 +0000)]
Infrastructure for an extension C-library to implement sqlite3_db_dump() and
a corresponding "dbdump" command-line utility - both of which do the same
work as the ".dump" command of the CLI.
drh [Mon, 13 Mar 2017 18:24:06 +0000 (18:24 +0000)]
In the output of the ".dump" command in the CLI, quote newline and
carriage-return characters using the char() function, so that they do not
get eaten by end-of-line processing logic in the OS or in other command-line
utilities and/or libraries.
drh [Mon, 13 Mar 2017 13:45:29 +0000 (13:45 +0000)]
In the OSSFuzz test module, invoke the progress handler much more frequently
so that timeouts are detected punctually even if the test script is running
opcodes that individually take a long time (for example, an OP_Function opcode
that invokes "randomblob(1.5e6)").
drh [Sat, 11 Mar 2017 13:02:59 +0000 (13:02 +0000)]
Make sure the translateColumnToCopy() routine in the query planner does not
try to access an array that failed to be fully allocated due to a prior OOM.
This fixes an issue discovered by OSSFuzz.
drh [Fri, 10 Mar 2017 17:03:11 +0000 (17:03 +0000)]
Fix an error in the SQLITE_MAX_MEMORY implementation resulting from a bad
merge. Update the OSSFuzz interface so that it times out after running
the byte-code engine for 10 seconds.
drh [Fri, 10 Mar 2017 01:05:38 +0000 (01:05 +0000)]
Improvements to ".selftest --init". Tests are number in increments of 10
starting with 100. The tests are generated inside a SAVEPOINT. Errors are
reported during test generation. Tests can be appended to existing tests.
Add a test case to verify the schema.
drh [Thu, 9 Mar 2017 22:00:33 +0000 (22:00 +0000)]
Remove the test/dbselftest.c program. In its place, add the ".selftest"
command to the CLI. The new CLI version is .selftest is slightly different
in that it uses SHA3 hashing instead of SHA1, so the new is subtly
incompatible with the old.
drh [Wed, 8 Mar 2017 17:56:54 +0000 (17:56 +0000)]
In the ".sha3sum" command, if there is a LIKE pattern, show the hashes for
each table separately. Without a LIKE pattern, show a single hash over the
entire database.
drh [Wed, 8 Mar 2017 16:10:34 +0000 (16:10 +0000)]
Add the ".sha3sum" command to the CLI - used to compute a cryptographic hash
of the <em>content</em> of a database file or of individual tables with in
that file.
drh [Fri, 3 Mar 2017 21:51:40 +0000 (21:51 +0000)]
If a reprepare is needed after binding to a variable with a number larger
than 32, set only the high-order bit of the Vdbe.expmask rather than setting
all bits. This could potentially result in fewer false-positive reprepares.
dan [Fri, 3 Mar 2017 16:51:46 +0000 (16:51 +0000)]
Before beginning an incremental checkpoint in RBU, sync the directory
containing the target database file. This ensures that the new directory entry
created by renaming the *-oal file to *-wal is synced to disk.
dan [Thu, 2 Mar 2017 14:51:47 +0000 (14:51 +0000)]
When saving the state of an RBU update in the incremental-checkpoint phase,
sync the database file. Otherwise, if a power failure occurs and the RBU
update resumed following system recovery, the database may become corrupt.
dan [Mon, 27 Feb 2017 16:15:29 +0000 (16:15 +0000)]
Add an sqlite3_set_last_insert_rowid() method. Use it to work around fts4 and
fts5 modifying the last-insert-rowid unintuitively from within commit
processing.
dan [Mon, 27 Feb 2017 14:52:48 +0000 (14:52 +0000)]
Add an sqlite3_set_last_insert_rowid() method. Use it to work around fts4 and
fts5 modifying the last-insert-rowid unintuitively from within commit
processing.
drh [Wed, 22 Feb 2017 20:24:10 +0000 (20:24 +0000)]
Change the name of the analyze_as_needed pragma to "optimize". Enhance the
comment (which will become documentation, assuming these changes land on trunk)
to explain that the optimize pragma is likely to be enhanced in various ways
in future releases and that applications should not depend upon the current
behavior.
drh [Wed, 22 Feb 2017 18:53:13 +0000 (18:53 +0000)]
Improvements to PRAGMA integrity_check.
Verify CHECK constraints.
Verify NOT NULL constraints even on table that lack indexes.
Verify CHECK and NOT NULL constraints with PRAGMA quick_check.
drh [Wed, 22 Feb 2017 15:11:36 +0000 (15:11 +0000)]
Fix integrity_check so that it verifies NOT NULL constraints even for tables
that have no indexes. Enhance quick_check so that it verifies NOT NULL and
CHECK constraints.
mistachkin [Mon, 20 Feb 2017 19:13:37 +0000 (19:13 +0000)]
Avoid unsigned integer overflows for SQLITE_WIN32_HEAP_INIT_SIZE when the Win32 heap subsystem is used with very large values of SQLITE_DEFAULT_CACHE_SIZE and/or SQLITE_DEFAULT_PAGE_SIZE.
drh [Sat, 18 Feb 2017 15:58:52 +0000 (15:58 +0000)]
Add the OP_SqlExec opcode and use it to implement "PRAGMA analyze_as_needed",
invoking ANALYZE subcommands as necessary. This simplifies the implementation.
drh [Sat, 18 Feb 2017 02:19:02 +0000 (02:19 +0000)]
In the analyze_as_needed pragma, avoid running unnecessary OP_LoadAnalysis
and OP_Expire opcodes. Make the analyze_as_needed pragma responsive to the
schema name.
drh [Fri, 17 Feb 2017 15:26:36 +0000 (15:26 +0000)]
Set the TF_StatsUsed flag on tables when the query planner outcome is
affected by the sqlite_stat1 data. Also, change the column names of the
"PRAGMA stats" command so that they are not keywords.
drh [Fri, 17 Feb 2017 13:38:15 +0000 (13:38 +0000)]
Enhance the Index and Table objects so that they remember if their stats come
from the sqlite_stat1 table. Make the "PRAGMA stats" an SQLITE_DEBUG only
pragma. Add the flags column to "PRAGMA stats". These are all preliminary
steps toward a "PRAGMA analyze_ifneeded;" feature.