Commit Graph

4442 Commits

Author SHA1 Message Date
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
d269461c91 Add the index7.test script for testing partial indices with WITHOUT ROWID
tables.  Fix bugs in ANALYZE located by that script.

FossilOrigin-Name: 79befe3ac1f676272b78423b9aa5dac41435420e
2013-11-04 22:04:17 +00:00
drh
c3e356fe10 Add another test case file for WITHOUT ROWID and fix the bugs that the new
test file uncovered.

FossilOrigin-Name: bc2a06eb8e57573d08e77800a7937eee5af3f035
2013-11-04 18:34:46 +00:00
drh
6546af1480 Correctly handle changing counting when inserting and deleting on
WITHOUT ROWID tables.  Add more FOREIGN KEY test cases.

FossilOrigin-Name: d072bcd0a8692d590c13c2bf458454c10c12a3e2
2013-11-04 15:23:25 +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
c6bd4e4a36 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.

FossilOrigin-Name: b7544bb280f1c1c55135a9b35aeb85604fef94a3
2013-11-02 14:37:18 +00:00
drh
71b4ea83e0 Import the sqlite3_analyzer fixes from trunk.
FossilOrigin-Name: ac711459ff243e787ea5e9c01720dff75a5eda9b
2013-11-02 11:43:05 +00:00
drh
a46417151a 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.

FossilOrigin-Name: 42a11e7464ab1d97d603c7409f10710ad4f1f542
2013-11-02 11:34:58 +00:00
drh
bc43ae3d0d Additional UPDATE test cases for WITHOUT ROWID.
FossilOrigin-Name: 65384ae0f027d05cf9208faed56575870d63c486
2013-11-01 18:14:36 +00:00
drh
1aae39cd26 Merge all changes from trunk, and disable a pair of corruption tests that are
no longer valid since sqlite_master.rootpage can now be NULL for tables.

FossilOrigin-Name: dd5d57b9a1b25fb6c9e20024e519b58630cf1fd0
2013-11-01 17:21:29 +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
mistachkin
99eef00d43 Enable some more tests on Windows.
FossilOrigin-Name: 72389c295bb240ec76746e289403b82e04189903
2013-10-31 06:13:57 +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
drh
5b843aa032 In the P4 column of the EXPLAIN listing, abbreviate "keyinfo" as just "k" and
"BINARY" as just "B".

FossilOrigin-Name: 72d45eb79b5d0505050cff57a00d725948b2a0c0
2013-10-30 13:46:01 +00:00
drh
8075cc17d3 Merge recent fixes from trunk.
FossilOrigin-Name: 9f8191d1d833acaaf612fdff8cc6bd544c042986
2013-10-28 22:39:53 +00:00
drh
70a0222f07 Add regression tests for ticket [c620261b5b5].
FossilOrigin-Name: 05a35b09b140fed0898afd36bc641e275545a35f
2013-10-28 20:38:52 +00:00
drh
11f9b033cc Report an error when trying to resolve column name "rowid" in a
WITHOUT ROWID table.

FossilOrigin-Name: 36bcc9cb885523fba2f3b0d152de9e08073668c1
2013-10-23 17:39:41 +00:00
drh
ad124329ab Some inserts and queries working for multi-column primary keys
and WITHOUT ROWID.

FossilOrigin-Name: b21d831b2aa55507dd9def2acb02cdbffddf10d1
2013-10-23 13:30:58 +00:00
drh
ec95c44175 Some simple inserts and queries working on WITHOUT ROWID tables.
FossilOrigin-Name: 3f8016dee24213ec83a02d71ad2698789cc3a818
2013-10-23 01:57:32 +00:00
drh
42533337e2 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.

FossilOrigin-Name: 5ca0ea2e9b40a7fa133d2af8a2ecc676de7a8723
2013-10-22 10:23:26 +00:00
drh
5969da4a2c Simplification of the syntax: Merely append "WITHOUT rowid" to the end of
the table definition.

FossilOrigin-Name: 131cc6e152abe1a2d48e6d8d40d2c2f8dbe723e7
2013-10-21 02:14:45 +00:00
drh
81eba73ebf 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.

FossilOrigin-Name: 0248ec5e6e3797575388f046d8c27f7445fe2a39
2013-10-19 23:31:56 +00:00
dan
197bc20c48 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.
FossilOrigin-Name: 56dca4a65c3b14123272fa0cc5c15530c06fda28
2013-10-19 15:07:49 +00:00
dan
a4bbc8b119 Add the "languageid" hidden column to fts4aux.
FossilOrigin-Name: 891df358e51075fb937f34952ce43bf51130b0d0
2013-10-15 19:06:17 +00:00
drh
5f8cdac620 Move the tointeger() and toreal() functions out of core and make them into
a run-time loadable extension.

FossilOrigin-Name: 9f66dd7e3790c04f0ab724419f5381bd21f9ebad
2013-10-14 21:14:42 +00:00
dan
362d21614e Fix a crash in FTS incremental phrase processing that can occur if the second or subsequent token is much more common in the dataset than the first.
FossilOrigin-Name: 0bf438fc30582a08fddfc3cec49366ee17ae2abe
2013-10-14 20:30:51 +00:00
drh
4398c9524f Add implementations for the toInteger() and toReal() SQL functions.
FossilOrigin-Name: a0f7cbc068416cf55b86056f2ce7ee505c6cc3ea
2013-10-14 19:35:33 +00:00
drh
71d5338c5d Update the foreign_key_check pragma so that when a parent table is undefined
it is treated as an empty table.

FossilOrigin-Name: 208b259ad73b51e7df163fee3d7ed2bd79767597
2013-10-14 14:30:02 +00:00
mistachkin
d5570119b7 Merge updates from trunk.
FossilOrigin-Name: a88b5be01e68b26267ff6eb05e931ef2e7fc9f99
2013-10-12 23:39:49 +00:00
drh
3ef261567a Restore the index_list pragma back to its former operation. Create a new
PRAGMA stats used to access the table and index widths and heights.

FossilOrigin-Name: f0cf8c85dcbcc7778aed2816792c368d777f79cb
2013-10-12 20:22:00 +00:00
dan
5e87830fa3 In "PRAGMA foreign_key_check", treat missing parent tables as empty (instead of as errors).
FossilOrigin-Name: 8c13a7fd738e5441af370537649b0bfa97679cda
2013-10-12 19:06:48 +00:00
dan
a8dbadacee Fix handling of "DROP TABLE" commands when "PRAGMA defer_foreign_keys=1" is set.
FossilOrigin-Name: 27001356ed8201529b3f31d4313f2010f1b4e1b1
2013-10-12 15:12:43 +00:00
drh
5dbb7cc24f Add tests that demonstrate that PRAGMA defer_foreign_keys will reset to off
at the conclusion of the next transaction.

FossilOrigin-Name: 67e28a11de97e97889f0c0f41c05605721c605c1
2013-10-12 13:16:15 +00:00
mistachkin
549bc3db1f Fix Unicode character encoding issues on Windows.
FossilOrigin-Name: c9310c9a2bad11f1d033a57b33ea7aed43a8238d
2013-10-12 00:56:21 +00:00
drh
cf9fca4629 Identify requirements text in the SQLITE_CONFIG_ documentation. Fix a typo
(a duplicated word) in part of that documentation.  Add some requirements
marks for DETACH to the test scripts.  No code changes.

FossilOrigin-Name: 1be0a3adaba2914c65c46fbebc4906ae4e70f899
2013-10-11 23:37:57 +00:00
mistachkin
cbc53fec75 Fix test numbering.
FossilOrigin-Name: cef39f6933dcfec4b4a087a05dbb4e7766003fb7
2013-10-11 22:17:39 +00:00
drh
e4bf4f08c0 Add requirements marks. No code changes.
FossilOrigin-Name: 5e0d43ab55de006b20c58cb18b938d1c7b658e51
2013-10-11 20:14:37 +00:00
drh
3432daa8b2 Additional test cases and requirements marks for the unlikely(),
likelihood() and instr() functions.

FossilOrigin-Name: 5f01cd36ee8678a07b79f9e01855daffb6bb8c43
2013-10-11 16:35:49 +00:00
dan
30e2f0ae08 Add ext/misc/vfslog.c, a VFS shim for unix that keeps a log of method calls made by SQLite.
FossilOrigin-Name: 24a827b87666670c56d68a18685f4f712852fa92
2013-10-10 13:04:46 +00:00
drh
833d198fb1 Fix test cases for the new information in PRAGMA index_list.
FossilOrigin-Name: dd03be1065537679c2daf5e4200902c47714fceb
2013-10-08 22:25:22 +00:00
drh
b50596d64d Rollback some of the previous changes in the branch such that the estimated
row sizes are now only used as a tie-breaker for index scans.

FossilOrigin-Name: 65553ff34b41e54d129ff2fee96be714105503c4
2013-10-08 20:42:41 +00:00
drh
186ad8cc32 Further refinement of the idea of multiplying run-time cost estimates by
the estimated row size.

FossilOrigin-Name: 18bd6ba96d19de6047baebfa15b1f739577c9ec4
2013-10-08 18:40:37 +00:00
drh
03e1754e31 Merge trunk changes.
FossilOrigin-Name: c6ac80ed8d5240dd30783d62d9f133e159809dec
2013-10-04 20:39:44 +00:00
drh
165674d8db Fix test cases so that they work when the query planner uses index size
estimates to determine whether or not to try an covering index scan.

FossilOrigin-Name: 2f394de88f23dacd3c61e586a4214ffc6f927d97
2013-10-04 15:58:59 +00:00
drh
fdaac671b8 Improved estimates of the relative speed of index scans based on declared
datatypes of columns in the table.  Add "r" column to PRAGMA index_info,
showing the estimated relative scan rate.

FossilOrigin-Name: 07462bb6059f023c22a6c84a4a02afbd84e69255
2013-10-04 15:30:21 +00:00
drh
d9e3cad2f8 Progress toward using the iScanRatio information on indices. Many tests
are still failing.

FossilOrigin-Name: 6c352edbba85a15ca356b5e131f4b3b2723d1774
2013-10-04 02:36:19 +00:00