Commit Graph

28 Commits

Author SHA1 Message Date
drh 1e7c00e695 Fix the xferCompatibleIndex() function so that it recognizes that a PRIMARY KEY
index for a WITHOUT ROWID table is different from a UNIQUE constraint index
on the primary key.  Ticket [302027baf1374498]

FossilOrigin-Name: 34f64f11ca481996b1ff1686bdc5e278946635b6856cd1fe2355fce8e298e0f8
2019-11-07 14:51:24 +00:00
dan b008e4d744 Fix some test script issues that come up with SQLITE_OMIT_VIRTUALTABLE builds.
FossilOrigin-Name: 3934d2d08ee14d644dc01f967c10f219b76b172c963c90a7a8141f2b08a7d5bf
2019-10-03 14:36:36 +00:00
drh 175b8f06f7 Remove support for STAT3. The sqlite_stat3 tables are ignored, if they
exist.  STAT4 continues to work as it always has, and as it is a superset of
STAT3 is the recommended replacement.

FossilOrigin-Name: 1e17ea2fd1df4ad49138c787c8fe3207dd0c25c93f9001d52a9b69f8c12e841c
2019-08-08 15:24:17 +00:00
drh 19d9a3ca6c New test cases for PRAGMA index_xinfo on a WITHOUT ROWID table. And new
testcases using index_xinfo to verify that WITHOUT ROWID tables are
constructed correctly.

FossilOrigin-Name: 340378c1e60da80263523776f4b6366a9d332a7ee25986637e8b157f4e8e4bd3
2019-07-17 12:42:15 +00:00
drh bf9ff256fe Disable index seek optimizations on REINDEX when the order of primary keys
in the index differs from the main table.
Fix for ticket [bba7b69f9849b5bf11b4].

FossilOrigin-Name: f7aadfab3bb8eb8eb2cd62dc8a6823538387b3329f1efc23ef75482488109478
2019-05-14 00:43:13 +00:00
drh 4baa75b32f Do not de-duplicate columns index columns associated with a WITHOUT ROWID table
if the columns have different collating sequences.  This is the fix for
ticket [3182d3879020ef3b2].  There is one test case added, but most of the
tests are done in TH3.

FossilOrigin-Name: 1b1dd4d48cd79a585e1fa7ee79128e9f2a9ee9846339dc56bbd67b75112dcad5
2019-04-29 13:48:45 +00:00
dan d1f9932e4b Add further test cases to improve VDBE branch coverage.
FossilOrigin-Name: 51a95e52fc58d8be2c9c51576dff7258c705735b66d203948f80db017b4c10d2
2019-04-04 20:55:37 +00:00
dan b84b38fd89 Add test cases to improve coverage of VDBE branches. Still some to go.
FossilOrigin-Name: 4cef609d61de272cfdc2b39e1d49c7cd56ec834086bd63095116ff98f4d402bd
2019-04-04 17:58:34 +00:00
drh b3f0276b9e Fix test cases so that they work with the new EXPLAIN QUERY PLAN output
format.  Only some of the cases have been fixed.  This is an incremental
check-in.

FossilOrigin-Name: 5f0e803e33aa557865d5fc830d9202d628de9a94c9757058ca48f1a560702cd3
2018-05-02 18:00:17 +00:00
dan 9a3c375fce Fix an instance where an uninitialized VM register might be accessed. Fix for
[093420fc0]. This problem was found by OSSFuzz.

FossilOrigin-Name: a3b02db74681a215996c5ed110eb0ece5ed24f71a1b131c10e9f33e666af0256
2018-04-05 16:26:39 +00:00
drh df94966c8b Correctly handle an "INTEGER PRIMARY KEY UNIQUE" column in a WITHOUT ROWID
table.  This is a fix for ticket [bc115541132dad136], a problem discovered
by OSSFuzz.

FossilOrigin-Name: 5216bfb73f1a49bdd879d470de139bf46a212474eaf6f38ad2390536d66a2afd
2017-07-30 18:40:52 +00:00
drh fccda8a162 CTEs have never add working rowids. So disallow the use of the "rowid" column
within CTEs.

FossilOrigin-Name: 0055df0445932a43e42b318ef88672dcbe312c3a
2015-05-27 13:06:55 +00:00
dan c5b7358513 Fix a problem with ignoring UNIQUE constraints on WITHOUT ROWID tables rendered redundant by the PRIMARY KEY.
FossilOrigin-Name: 3b936913f3dc2cae4c94f983f28d85b136a44c9f
2015-05-26 11:53:14 +00:00
dan 39129ce8d9 Fix where.c so that the primary key values appended to every index entry on a WITHOUT ROWID table may be used when useful.
FossilOrigin-Name: 6624a61d16e47ad691c4195ca8a1d68b7348118d
2014-06-30 15:23:57 +00:00
drh 784156f84c Make sure "rowid" columns are correctly resolved in joins between normal
tables and WITHOUT ROWID tables.  Fix for ticket [c34d0557f740c45070].

FossilOrigin-Name: 5d01426ddfb2d47c57f93f71378594e637424be0
2014-02-12 14:43:52 +00:00
dan 6d8578bc8f Remove an "explain" command from test script without_rowid1.test that was accidentally committed.
FossilOrigin-Name: 4b41d989e894b9214a9b973228ef8446356f9fbb
2013-11-05 16:56:11 +00:00
dan 427ebba10c Unless the destination table is completely empty, disable the xfer optimization for WITHOUT ROWID tables.
FossilOrigin-Name: 3877c9f50582b51817dcf3cd75d836891a34e590
2013-11-05 16:39:31 +00:00
dan e83267da54 Add tests for updates of without-rowid tables that use non-BINARY collation sequences for the primary key columns. And a minor bugfix to the same.
FossilOrigin-Name: 99b1fa4b1664a79eae1dddce2b9a848384cdb1d7
2013-11-05 14:19:22 +00:00
drh f9c8ce3ced 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.

FossilOrigin-Name: 54b221929744b1bcdbcc2030fef2e510618afd41
2013-11-05 13:33:55 +00:00
drh 00012df46d Add the conflict2.test script. Fix issues discovered by this script.
FossilOrigin-Name: 294ed33756b06375e56c41f1088d42ee48adbdc8
2013-11-05 01:59:07 +00:00
drh 63f0eedf10 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.

FossilOrigin-Name: 39e32187b66405e00dbd44685f6cdd269c90f5e5
2013-11-02 22:09:48 +00:00
drh ce95d11921 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.

FossilOrigin-Name: 4ee4d3106308508a58b80e54e0afb4afb42f510b
2013-11-02 19:34:38 +00:00
drh ebe25af168 Update the ANALYZE logic so that it works with WITHOUT ROWID tables.
FossilOrigin-Name: 9075770e4030b35677fbbe291f3c3c4946937a9a
2013-11-02 18:46:04 +00:00
drh bc43ae3d0d Additional UPDATE test cases for WITHOUT ROWID.
FossilOrigin-Name: 65384ae0f027d05cf9208faed56575870d63c486
2013-11-01 18:14:36 +00:00
drh f8ffb27850 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.

FossilOrigin-Name: c525ac5630d6bcd51842cfc84f2c2c50be9cec1c
2013-11-01 17:08:56 +00:00
drh 6934fc7b6f Improved comments and variable names in infrastructure routines of UPDATE,
DELETE, and INSERT.

FossilOrigin-Name: ad90e762e51384ac7c311f08a641419f03f6d3f0
2013-10-31 15:37:49 +00:00
drh 26198bb481 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.

FossilOrigin-Name: 1adfca6019847d37dee4a297669f29d5ca184066
2013-10-31 11:15:09 +00:00
drh 6fbe41acf2 Continue working to get UPDATE operational for WITHOUT ROWID tables.
Fix PRAGMA integrity_check so that it works on WITHOUT ROWID tables.

FossilOrigin-Name: 0d4fea7462c0f61cd1c736cbcd7bea5ec2034d54
2013-10-30 20:22:55 +00:00