drh [Wed, 6 Nov 2013 19:59:23 +0000 (19:59 +0000)]
Reference count the KeyInfo object. Cache a copy of an appropriate KeyInfo
for each index in the Index object, and reuse that one copy as much as possible.
dan [Wed, 6 Nov 2013 14:52:40 +0000 (14:52 +0000)]
Use ansi escape codes to use different colored text for opcode names in the output of [explain_i]: Red for opcodes that insert or delete b-tree elements, blue for opcodes that move cursors and green for the ResultRow opcode.
drh [Tue, 5 Nov 2013 13:33:55 +0000 (13:33 +0000)]
Standardize the error messages generated by constraint failures to a format
of "$TYPE constraint failed: $DETAIL". This involves many changes to the
expected output of test cases.
drh [Sat, 2 Nov 2013 22:09:48 +0000 (22:09 +0000)]
Many new test cases added, that mostly work. Currently 18 errors in
without_rowid3.test. Also there is a hack marked by a /*FIXME*/ comment
on at fkey.c:547 that needs fixing.
drh [Sat, 2 Nov 2013 19:34:38 +0000 (19:34 +0000)]
Change the "idx" name of the primary key index for WITHOUT ROWID tables in
sqlite_statN statistics tables to be the name of the table rather than the
fabricated index name (ex: sqlite_autoindex_xyz_1). This makes it consistent
with sqlite_master table.
drh [Sat, 2 Nov 2013 14:37:18 +0000 (14:37 +0000)]
Store the root page of the PRIMARY KEY index for a WITHOUT ROWID table in
the sqlite_master entry for the main table and omit the sqlite_master entry
for the PRIMARY KEY.
drh [Sat, 2 Nov 2013 11:34:58 +0000 (11:34 +0000)]
A pair of sqlite3_analyzer bug fixes: (1) quote strings in the SQL at the end
of the output. (2) Fix test_stat.c so that it no longer misses some overflow
pages on internal index pages.
drh [Fri, 1 Nov 2013 17:08:56 +0000 (17:08 +0000)]
Change the interface to sqlite3GenerateConstraintChecks() for improved lucidity
and to fix issues in dealing with UPDATEs for WITHOUT ROWID tables. Make sure
iDataCur and iIdxCur are initialized when processing DELETEs of a VIEW.
UPDATE processing distinguishes between changes to ROWID and PRIMARY KEY.
drh [Thu, 31 Oct 2013 20:34:06 +0000 (20:34 +0000)]
Fix the Synopsis on OP_Concat. Added test_addop_breakpoint() during
SQLITE_DEBUG. Enhanced sqlite3VdbeChangeToNoop() to omit the instruction
if it is the most recent added. Continue to fix problems with UPDATE
and WITHOUT ROWID.
drh [Thu, 31 Oct 2013 11:15:09 +0000 (11:15 +0000)]
Refactor the INSERT, DELETE, and UPDATE code generators to distinguish between
the "data cursor" and the "first index cursor", which are no longer consecutive
in the case of a WITHOUT ROWID table.
drh [Wed, 30 Oct 2013 15:52:32 +0000 (15:52 +0000)]
Make sure KeyInfo objects on multi-column indices of WITHOUT ROWID tables
have the correct nField and nXField values. Also, add the
SQLITE_ENABLE_MODULE_COMMENT compile-time option and the VdbeModuleComment()
macro and use it to label entry and exit points of some key routines.
drh [Wed, 30 Oct 2013 02:28:23 +0000 (02:28 +0000)]
Add the SQLITE_ENABLE_EXPLAIN_COMMENTS compile-time option to enable extra
commentary in the EXPLAIN output. Formerly, this was only available with
SQLITE_DEBUG.
drh [Tue, 29 Oct 2013 20:40:47 +0000 (20:40 +0000)]
Automatically generated comments on many VDBE opcodes when in SQLITE_DEBUG
most. Comments derive from the "Synopsis:" field added to each opcode
definition in vdbe.c.
drh [Mon, 28 Oct 2013 19:59:59 +0000 (19:59 +0000)]
More wheretrace debugging support: Show a listing of all WHERE clause
terms (on wheretrace bit 0x100) and include important flags such as
TERM_VIRTUAL, WO_EQUIV, and EP_FromJoin.
drh [Mon, 28 Oct 2013 14:34:35 +0000 (14:34 +0000)]
Improved "wheretrace" capabilities: Show the constraint expression if the
wheretrace flag has the 0x100 bit set and if compiled with
SQLITE_ENABLE_TREE_EXPLAIN.
drh [Thu, 24 Oct 2013 19:48:39 +0000 (19:48 +0000)]
Update the interface to the sqlite3GenerateRowDelete() utility so that it is
able to handle WITHOUT ROWID tables. The implementation still needs to be
completed.
drh [Tue, 22 Oct 2013 18:01:40 +0000 (18:01 +0000)]
The Index object now has nKeyCol and nColumn. nColumn is the total number
of columns and nKeyCol is the number of key columns. Currently these always
differ by one. Refactor aiColumn[] to be of type i16 instead of int.
drh [Tue, 22 Oct 2013 10:23:26 +0000 (10:23 +0000)]
Extra backwards-compatibility tests verify that UNIQUE and PRIMARY KEY
indices are created in the correct order. Other backwards-compatibility
tests already cover this, but it does not hurt to double up.
drh [Tue, 22 Oct 2013 01:18:17 +0000 (01:18 +0000)]
Previous refactor is not going to be helpful because implied indices must be
created in the same order that they appear in the CREATE TABLE statement
for backwards compatibility. This is a much smaller change to clean up a
few loose ends.
drh [Sat, 19 Oct 2013 23:31:56 +0000 (23:31 +0000)]
Experimental changes toward "index only" tables. Add the ability to specify
options on CREATE TABLE statements using the WITH clause modeled after
PostgreSQL and SQL Server. Only the "omit_rowid" option is currently
recognized and that option is currently a no-op.
dan [Sat, 19 Oct 2013 15:07:49 +0000 (15:07 +0000)]
Fix a bug causing an "malformed database schema error" error if a temp table with the same name as an existing table that has at least one temp trigger attached to it is created.
drh [Fri, 18 Oct 2013 20:03:43 +0000 (20:03 +0000)]
Add the SQLITE_FCNTL_TRACE file control and generate it for OP_Trace
when compiled with SQLITE_USE_FCNTL_TRACE. Update vfslog.c to make
use of the new file control. Also update vfslog.c to log UNLOCK events
before the fact, rather than afterwards.