dan [Wed, 6 Jul 2016 18:42:34 +0000 (18:42 +0000)]
Add the SQLITE_DBSTATUS_CACHE_USED_SHARED sqlite3_db_status() parameter. This option is similar to DBSTATUS_CACHE_USED, except that it divides memory used by shared caches evenly between all connections.
dan [Mon, 4 Jul 2016 11:47:48 +0000 (11:47 +0000)]
Add the sqlite3rbu_state() API. Used to determine the current state (creating OAL, ready to move OAL, incremental-checkpoint, finished or error) of an RBU operation.
Change the name of the intarray() extension to carray() and give it an
optional third parameter that specifies the datatype as one of 'int32',
'int64', 'double', or 'char*'. 'int32' is the default.
dan [Fri, 1 Jul 2016 12:39:58 +0000 (12:39 +0000)]
Add the sqlite3rbu_state() API. Used to determine the current state (creating OAL, ready to move OAL, incremental-checkpoint, finished or error) of an RBU operation.
dan [Thu, 23 Jun 2016 16:48:35 +0000 (16:48 +0000)]
Update the sqldiff utility so that if the --vtab switch is specified "rtree", "fts3", "fts4" and "fts5" tables are diff'd directly and the underlying real database tables ignored. Without this switch, all virtual tables are ignored and the diff is performed on the underlying real tables.
dan [Tue, 21 Jun 2016 10:34:41 +0000 (10:34 +0000)]
Update the sqldiff utility so that if the --vtab switch is specified "rtree", "fts3", "fts4" and "fts5" tables are diff'd directly and the underlying real database tables ignored. Without this switch, all virtual tables are ignored and the diff is performed on the underlying real tables.
dan [Mon, 20 Jun 2016 17:25:50 +0000 (17:25 +0000)]
For a table on the rhs of a LEFT JOIN operator, do not include terms like "IS NULL" from the WHERE clause in the cursor-hint. These may be false for rows that the cursor would otherwise visit, but true for a row of all NULL values generated by the LEFT JOIN.
dan [Fri, 17 Jun 2016 19:27:13 +0000 (19:27 +0000)]
Include WHERE terms in the cursor-hint passed to a cursor opened for the rhs of a LEFT JOIN iff we can be sure that those terms will not evaluate to true if the LEFT JOIN generates a row of NULLs.
dan [Thu, 16 Jun 2016 17:14:02 +0000 (17:14 +0000)]
Add a missing OP_ColumnsUsed opcode to code for expressions like "? IN (SELECT ...)" in cases where expression can use an index that may contain NULL values.
drh [Mon, 13 Jun 2016 19:58:46 +0000 (19:58 +0000)]
Fix RBU so that it builds with -DSQLITE_ENABLE_8_3_NAMES.
Fix "PRAGMA compile_options" for SQLITE_ENABLE_8_3_NAMES such that it reports
the numeric setting: "1" or "2".
drh [Wed, 8 Jun 2016 14:04:50 +0000 (14:04 +0000)]
Add the "dbhash.exe" utility program that computes a SHA1 hash over the
invariant content of an SQLite database file. Free space in the file, the
page size, auto_vacuum status, text encoding, and so forth do not change the
hash. Only the content matters.
drh [Wed, 8 Jun 2016 13:49:28 +0000 (13:49 +0000)]
Fix the dbhash utility so that it ignores the root page number when hashing
the sqlite_master table. Add new command-line options. Add the ability to
hash multiple databases with a single command.
drh [Mon, 6 Jun 2016 01:14:08 +0000 (01:14 +0000)]
Btree interface refactoring:
(1) The sqlite3BtreeKeySize() interface is renamed to sqlite3BtreeIntegerKey()
and modified to work only for table btrees with a rowid.
(2) The sqlite3BtreeDataSize() interface is renamed to sqlite3BtreePayloadSize()
and modified to work with any btree.
(3) The sqlite3BtreeDataFetch() and sqlite3BtreeKeyFetch() routines are
combined into a single sqlite3BtreePayloadFetch() routine.
The result of these changes is a smaller binary and fewer CPU cycles needed
to run queries.
drh [Sat, 4 Jun 2016 20:37:10 +0000 (20:37 +0000)]
Change the sqlite3BtreeKeySize() interface into sqlite3BtreeIntegerKey() and
make it only work for table btrees. Change sqlite3BtreeDataSize() into
sqlite3BtreePayloadSize() and make it work for all btrees. Combine
sqlite3BtreeDataFetch() and sqlite3BtreeKeyFetch() into a single
sqlite3BtreePayloadFetch() routine. These changes seem to make the
b-tree interface more rational and they reduce both binary size and
CPU usage.
drh [Fri, 3 Jun 2016 18:44:43 +0000 (18:44 +0000)]
Add support for virtual tables using a WITHOUT ROWID schema. This merge also
includes enhancements to the CSV extension, which is used for testing of
the new WITHOUT ROWID virtual table mechanism.
drh [Fri, 3 Jun 2016 13:35:55 +0000 (13:35 +0000)]
Enhance the sqlite3_load_extension() interface to permit extensions to
return SQLITE_OK_LOAD_PERMANENTLY which will prevents unloading when
the database connection closes.
drh [Thu, 2 Jun 2016 23:13:21 +0000 (23:13 +0000)]
Add the CSV extension to the test fixture. Fix a memory leak in the CSV
extension. Add test cases for the CSV extension, including one that uses
a WITHOUT ROWID virtual table participating in the OR optimization.
drh [Tue, 31 May 2016 21:18:15 +0000 (21:18 +0000)]
An experimental branch with code that allows virtual tables to be declared
as WITHOUT ROWID tables. This might be useful for virtual tables that model
external data sources that do not have a convenient way of computing a unique
rowid. The current check-in almost works, but there are still serious issues.
dan [Mon, 30 May 2016 08:28:21 +0000 (08:28 +0000)]
Fix an FTS5 problem (segfault or incorrect query results) with "... MATCH 'x OR y' ORDER BY rank" queries when either token 'x' or 'y' is completely absent from the dataset.
drh [Sat, 28 May 2016 17:23:08 +0000 (17:23 +0000)]
Enhance the sqlite3_load_extension() interface to permit extensions to
return SQLITE_OK_LOAD_PERMANENTLY which will prevent the extensions from
unloading when the database connection closes.
drh [Sat, 28 May 2016 14:53:48 +0000 (14:53 +0000)]
Add the vfsstat.c loadable extension - a VFS shim that measures the amount
of I/O, and an eponymous virtual table that is used to extract and view
the measurements.
dan [Tue, 24 May 2016 16:20:51 +0000 (16:20 +0000)]
Fix an obscure problem with transactions written in "PRAGMA synchronous=full" mode on systems that do not support POWERSAFE_OVERWRITE causing an xSync() call to be omitted if the last frame written by a transaction is aligned to a sector boundary. This means that if a power failure or OS crash occurs very soon after such a transaction is committed, it may be lost following system recovery.
drh [Mon, 23 May 2016 21:56:24 +0000 (21:56 +0000)]
Use a pointer to the top of the stack rather than an index into the stack
in the Lemon-generated parser template, for about 6.6% parser performance gain.