drh
9ac3c1ea40
Add the "wordcount.c" test program.
...
FossilOrigin-Name: f02ee5463084cef45ae412c51211b66de7e86baf
2013-11-07 18:37:31 +00:00
drh
b0e503409d
Add support for WITHOUT ROWID tables. This change also includes
...
(1) standardization of the error message returned from run-time constraint
errors, (2) improved EXPLAIN comments, (3) the SQLITE_ENABLE_EXPLAIN_COMMENTS
option, (4) the SQLITE_ENABLE_MODULE_COMMENTS option, and (5) a bug fix
(see [573cc27427]) in the handling of REPLACE on the rowid when secondary
indices use FAIL or IGNORE.
FossilOrigin-Name: c80e229dd9c1230abefbc707d4bf0b24315c6bb5
2013-11-07 16:08:10 +00:00
dan
5c663c3002
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.
...
FossilOrigin-Name: 4be2b64b3e5237ee1fb156c06cffaf7d96f6c532
2013-11-06 14:52:40 +00:00
drh
416846a362
Improved ORDER BY optimization for WITHOUT ROWID tables.
...
FossilOrigin-Name: 8f1709ff2d52d5ceca3da6a2a4e06da204d9e65a
2013-11-06 12:56:04 +00:00
drh
d4ddae985b
Disable the OR optimization for WITHOUT ROWID tables, since it relies on
...
the use of rowids.
FossilOrigin-Name: 6055dad2ba2f9256b1f2d0a9e32ca00f1b81b0cf
2013-11-06 12:05:57 +00:00
drh
79b9831cdd
Remove an incorrect test case from conflict2.test.
...
FossilOrigin-Name: 427612efc169c8ebe94a8b586d7abd0fcd43d0d0
2013-11-06 11:46:48 +00:00
drh
8d1b82e40b
Fix conflict handling for the case when the rowid uses REPLACE but other
...
unique constraints use FAIL or IGNORE.
FossilOrigin-Name: 573cc27427af297185f11aac8dce88ca31f471ca
2013-11-05 19:41:32 +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
7b3d1860af
Updates to the backcompat.test test script so that it works with really old (3.6.*) versions.
...
FossilOrigin-Name: ace7e7b64261aeabc9525d5d0cfebe0275c9ddf5
2013-11-05 15:02:39 +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
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
dan
d6dd5def4d
Fix a bug preventing FTS from correctly processing bracket tokens that are immediately preceded by characters that are neither whitespace or token characters.
...
FossilOrigin-Name: 49be646cd981f8ff0434cf90d2748afa30260017
2013-11-04 08:56:22 +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