dan [Sat, 14 Mar 2015 18:59:58 +0000 (18:59 +0000)]
When estimating the number of rows visited by a range scan for which the keys consist of more than one field, consider prefixes of stat4 samples as well as the full samples.
drh [Thu, 12 Mar 2015 18:38:51 +0000 (18:38 +0000)]
If an error occurs in the compile-time evaluation of an application-defined
function, then propagate back out the exact error code, not just the
generic SQLITE_ERROR.
dan [Wed, 11 Mar 2015 20:59:42 +0000 (20:59 +0000)]
Allow the default value for columns added using ALTER TABLE ADD COLUMN to be a function in existing schemas loaded from disk. But prevent this version of SQLite from being used to create such a column.
dan [Wed, 11 Mar 2015 20:06:40 +0000 (20:06 +0000)]
Allow the query planner to evaluate deterministic scalar SQL functions used in WHERE constraints if all arguments are SQL literals in order to compare the results with sqlite_stat4 sample data.
drh [Fri, 6 Mar 2015 16:45:16 +0000 (16:45 +0000)]
The LIKE optimization must be applied twice, once for strings and a second
time for BLOBs. Ticket [05f43be8fdda9f]. This check-in is a proof-of-concept
of how that might be done.
drh [Thu, 5 Mar 2015 14:29:02 +0000 (14:29 +0000)]
Revert "PRAGMA index_info" to output only three columns, for complete
compatibility with prior versions. The new "PRAGMA index_xinfo" can be
used to get the extra information in 4th, 5th, and 6th columns.
drh [Tue, 3 Mar 2015 20:42:01 +0000 (20:42 +0000)]
Clean up #ifdef logic dealing with VxWorks in os_unix.c. On VxWorks,
automatically use posix advisory locking if it is available or fall back
to named semaphore locking if not.
drh [Mon, 2 Mar 2015 22:06:43 +0000 (22:06 +0000)]
Changes so that the amalgamation and the command-line shell build without
modifications on VxWorks 7. Still gives a few compiler warnings, and still
mostly untested on that platform.
drh [Thu, 26 Feb 2015 16:32:33 +0000 (16:32 +0000)]
Fix a real bug (in test code) that was introduced while trying to eliminate
harmless compiler warnings from OpenBSD (see check-in [10321910990195878c]).
dan [Tue, 24 Feb 2015 20:10:49 +0000 (20:10 +0000)]
Prevent partial indexes on the table on the left hand side of a LEFT JOIN from being incorrectly qualified by a constraint in the ON clause of the join. This relaxes the rule introduced by the previous commit (as the partial indexes on the table on the rhs of the LEFT JOIN may now be qualified by terms within the ON clause).
drh [Tue, 24 Feb 2015 20:04:59 +0000 (20:04 +0000)]
Make sure partial indexes are not qualified incorrectly by a constraint that
is inside the ON clause of a LEFT JOIN. Fix for ticket [2326c258d02ead33].
drh [Tue, 24 Feb 2015 16:48:59 +0000 (16:48 +0000)]
This additional fix prevents a partial index from being qualified for use
if the constraint that qualifies the partial index is part of the ON clause of
a LEFT JOIN.
drh [Sat, 21 Feb 2015 15:42:57 +0000 (15:42 +0000)]
Update document on sqlite3_mprintf() and related functions. Discuss the
%w format and point out that obscure ANSI-C formats are not supported.
No changes to code.
drh [Sat, 21 Feb 2015 00:19:25 +0000 (00:19 +0000)]
Keep track of the optimal number of reserved bytes (by looking at reserve
byte requests in calls to sqlite3BtreeSetPageSize()) and then change the
reserve byte count to the optimal when doing a VACUUM or when using the
backup API.
drh [Mon, 9 Feb 2015 18:28:03 +0000 (18:28 +0000)]
Propagate COLLATE operators upward through function calls and CASE operations.
And do not flatten an aggregate subquery into a query that uses other
subqueries. Fixes for tickets [ca0d20b6cdddec5] and
[2f7170d73bf9], respectively.
drh [Mon, 9 Feb 2015 15:21:36 +0000 (15:21 +0000)]
Disable the query flattener for aggregate subqueries if the parent query
uses other subqueries in its result set or WHERE clause or ORDER BY clause.
Preliminary fix for ticket [2f7170d73bf9abf8]. However it still contains
a defect similar to the COLLATE problem of [ca0d20b6cddd].
drh [Mon, 9 Feb 2015 13:42:59 +0000 (13:42 +0000)]
In selecttrace 0x100 mode, show the parse tree after name resolution instead
of before flattening, so that it is always seen even if flattening does not
occur. Also: add the hex pointer value to the top of each SELECT tree.
drh [Sat, 7 Feb 2015 15:16:35 +0000 (15:16 +0000)]
Fix potential 32-bit integer overflow problems on the offset and length
parameters to sqlite3_blob_read() and sqlite3_blob_write(). For
sqlite3_blob_open(), make sure the *ppBlob return parameter is zeroed if
the interface fails with SQLITE_MISUSE.
drh [Fri, 6 Feb 2015 14:51:13 +0000 (14:51 +0000)]
Change the name of ".info" to ".dbinfo" and add an optional second argument
which is the ATTACH-ed DB about which information is provided. Provide
".indexes" as an alternative name to the legacy ".indices" command.
drh [Fri, 6 Feb 2015 01:07:15 +0000 (01:07 +0000)]
Add the index_xinfo pragma which gives information about the fields that
reference the table PRIMARY KEY in addition to the index key fields.
Add extra columns "desc", "coll", and "key" to the index_info and index_xinfo
pragmas. Add the "origin" and "partial" columns to the index_list pragma.
drh [Fri, 30 Jan 2015 20:59:27 +0000 (20:59 +0000)]
Change SQLITE_TESTCTRL_INITMODE to SQLITE_TESTCTRL_IMPOSTER. Revise the order
of parameters. Give it the ability to reset the schema parse table so that
imposter tables can be erased.
dan [Thu, 29 Jan 2015 19:12:12 +0000 (19:12 +0000)]
Ensure that "PRAGMA wal_checkpoint = TRUNCATE|FULL|RESTART" block on other connections and truncate the database file as required even if the entire wal file has already been checkpointed.