dan [Fri, 6 Jan 2017 13:52:58 +0000 (13:52 +0000)]
Ensure that "PRAGMA case_sensitive_like" and "PRAGMA shrink_memory" set the
number of output columns to 0 (as they are statements that return no data).
dan [Thu, 5 Jan 2017 20:01:29 +0000 (20:01 +0000)]
Ensure that sqlite3_column_count() returns 0 for the "set" mode of "get/set"
PRAGMA statements that do not return a value in that case (e.g. page_size,
cache_size, auto_vacuum).
dan [Thu, 5 Jan 2017 17:25:53 +0000 (17:25 +0000)]
Fix handling the case where a sub-query in a FROM clause is itself a UNION
ALL, and one side of that UNION ALL is a query on a view that includes an
ORDER BY. Fix for ticket [190c2507].
drh [Thu, 5 Jan 2017 13:56:17 +0000 (13:56 +0000)]
Fix problems in trigger and foreign key handling when doing REPLACE on a
WITHOUT ROWID table that has no secondary indexes.
Fix for ticket [30027b613b4].
drh [Thu, 5 Jan 2017 13:52:54 +0000 (13:52 +0000)]
Ensure that the sqlite3_value_text() interface returns a buffer that is long
enough to hold the complete string plus the zero terminator even when the
input is a zeroblob. Fix for a problem detected by OSS-Fuzz.
drh [Fri, 30 Dec 2016 00:09:14 +0000 (00:09 +0000)]
Encode a 64-bit integer literal in date.c as a constant expression so that
it works on older compilers. Also fix a harmless compiler warning in vdbe.c.
drh [Thu, 29 Dec 2016 17:25:06 +0000 (17:25 +0000)]
In kvtest.c, use stat() instead of fseek()/ftell() to determine the size of
a BLOB to be read directly from disk. This makes the pile-of-files database
more competative against SQLite.
drh [Thu, 29 Dec 2016 16:58:01 +0000 (16:58 +0000)]
Add the kvtest.c test program used to show that it is many times faster to
read thumbnail and similar BLOBs out of an SQLite database than it is to read
them as separate files from the filesystem.
drh [Mon, 26 Dec 2016 01:41:33 +0000 (01:41 +0000)]
Remove an incorrect ALWAYS() macro from balance_nonroot(), which could result
in corrupt databases if it were optimized out. This ALWAYS was added
only two weeks ago (check-in [f9f2e23bbd68a]) and has never appeared in an
official release.
drh [Sat, 24 Dec 2016 21:32:40 +0000 (21:32 +0000)]
Combine the implementations of the ".tables" and ".indexes" commands in the
command-line shell. The ".indexes" command now puts the indexes in multiple
columns, just like ".tables" and shows all indexes in all attached databases.
drh [Sat, 24 Dec 2016 19:37:16 +0000 (19:37 +0000)]
The schema name "main" is always an acceptable alias for the primary database
even if the primary database is renamed using SQLITE_DBCONFIG_MAINDBNAME.
drh [Sat, 24 Dec 2016 18:18:58 +0000 (18:18 +0000)]
Change the output format of the ".databases" command in the command-line shell
so that it shows the schema name, a colon, and the corresponding filename.
drh [Sat, 24 Dec 2016 18:04:28 +0000 (18:04 +0000)]
In the command-line shell, improve the formatting to the ".databases"
command and on the ".tables" command, only show the schema prefix for
databases past the first ("main") database.
drh [Fri, 23 Dec 2016 03:59:31 +0000 (03:59 +0000)]
Use the VList object to replace Parse.azVar for tracking the mapping between
SQL parameter names and parameter numbers. There is a performance
improvement, though there are still a few hiccups in the current code.
drh [Wed, 21 Dec 2016 21:26:58 +0000 (21:26 +0000)]
Change the default lookaside configuration from 500 slots of 128 bytes each to 125 slots of 512 bytes each. This uses the same amount of memory (64,000 bytes) but seems to perform much better in test applications.
drh [Sun, 18 Dec 2016 17:42:00 +0000 (17:42 +0000)]
Change the OP_IfNotZero opcode so that it decrements register P1 by 1 rather
than the value in P3, and so that it only decrements if originally positive.
This avoids decrementing the smallest 64-bit signed integer.
drh [Sat, 17 Dec 2016 20:27:22 +0000 (20:27 +0000)]
Enhance fuzzershell.c to read and execute SQL commands in the autoexec table
of the database under test. Add the dbfuzz.c test program combining selected
features of fuzzershell.c and fuzzcheck.c.
dan [Sat, 17 Dec 2016 08:18:05 +0000 (08:18 +0000)]
Fix a problem in the shell tools readfile() command causing blobs to be
truncated at the first embedded 0x00 byte in release builds, or an assert() to
fail in a debug build.
dan [Wed, 14 Dec 2016 19:28:27 +0000 (19:28 +0000)]
Add the experimental ".fkey_missing_indexes" command to the shell tool. To
identify indexes that should be created on child keys if FK processing is to
be enabled.
drh [Tue, 13 Dec 2016 23:22:39 +0000 (23:22 +0000)]
In the command-line shell, in the output of the ".dump", ".schema", and
".fullschema" commands, convert CREATE TABLE statements that appear to come
from shadow tables into CREATE TABLE IF NOT EXISTS statements.
dan [Tue, 13 Dec 2016 16:57:49 +0000 (16:57 +0000)]
Fix a problem causing SQLite to return false "foreign key violation" errors
when there is a partial (i.e. WHERE constrained) UNIQUE index on the parent
key columns. This bug did not cause SQLite to allow illegal data to be
inserted into the database, only to reject legal operations.
drh [Tue, 13 Dec 2016 14:32:47 +0000 (14:32 +0000)]
Make the sqlite3PagerGet() interface into a virtual method, with different
implementations based on the current state of the pager. This gives a small
performance increase by avoiding unnecessary branches inside the various
methods.
drh [Sat, 10 Dec 2016 12:58:15 +0000 (12:58 +0000)]
Reorder the fields in the VdbeCursor object so that those that need to be
bulk zeroed on allocation are grouped at the beginning, and the memset()
only runs over those fields that really need it.