Commit Graph

13304 Commits

Author SHA1 Message Date
drh
00dbc89824 Merge the command-line shell enhancements from trunk.
FossilOrigin-Name: c3931db560ab4a2601c7f7318fb02c8d5e6862b1
2015-02-06 15:03:45 +00:00
drh
0e55db1cd8 Change the name of ".info" to ".dbinfo" and add an optional second argument
which is the ATTACH-ed DB about which information is provided.  Provide
".indexes" as an alternative name to the legacy ".indices" command.

FossilOrigin-Name: 0f65a7e2e09f801b66897479d501607caeae4abf
2015-02-06 14:51:13 +00:00
drh
f7502f005e Add the ".info" command to the shell.
FossilOrigin-Name: 0a3100a7f264ffce6078c35e341f2f0af6c09fbb
2015-02-06 14:19:44 +00:00
drh
fe0e84c948 Add the index_xinfo pragma which gives information about the fields that
reference the table PRIMARY KEY in addition to the index key fields.
Add extra columns "desc", "coll", and "key" to the index_info and index_xinfo
pragmas.  Add the "origin" and "partial" columns to the index_list pragma.

FossilOrigin-Name: 2743846cdba572f616f56d310633703b8b50959e
2015-02-06 01:07:15 +00:00
drh
2f8109cef1 Revise the way that the index structure for a WITHOUT ROWID table is
discovered.

FossilOrigin-Name: 7f10a0eaf1fedfa020cbd7019ec9342ffdc3b9b0
2015-02-06 00:31:45 +00:00
dan
8800b53bc5 Change a comment in sqlite3ota.h to make it clear that it is not possible to insert a NULL value into an INTEGER PRIMARY KEY column using ota.
FossilOrigin-Name: a5e86bea4ad51bbb988a2a2215961706894f4a02
2015-02-05 17:46:19 +00:00
dan
a8ccf3ed74 Prevent ota updates from violating NOT NULL constraints. Add a comment to the "limitations" section of sqlite3ota.h saying that CHECK constraints are not enforced.
FossilOrigin-Name: 74e073dd604142212f3d3e1931065d124daabd80
2015-02-05 17:36:30 +00:00
drh
d4ef7c50bb Figure out the primary-key type of a table using queries of sqlite_master
and the table_info and index_list pragmas, obviating the need for
SQLITE_TESTCTRL_TBLTYPE.

FossilOrigin-Name: 50ecdfc443b51e3569c6add2fba5132f959c61cb
2015-02-05 01:49:31 +00:00
drh
fe9752d934 Merge all changes from index_xinfo, including the move of the pragma table
into the separate pragma.h file.

FossilOrigin-Name: 21e95d28a51e56b45a9d4166475972535e53f954
2015-02-04 23:51:59 +00:00
drh
4bb8cb0927 Merge all recent trunk changes, including the movement of the pragma
table into the separate pragma.h header file.

FossilOrigin-Name: 3af19f84446ba5fc1ed754d0d73f6a6d7fb2f365
2015-02-04 23:13:48 +00:00
drh
8fb15e3b20 Fix a missing mutex in SQLITE_TESTCTRL_IMPOSTER.
FossilOrigin-Name: 71691c4be54b9ac6a35e35013f939b7d6fd4e6b8
2015-02-04 20:56:49 +00:00
dan
06c9722564 Fix the error messages returned by ota if an update violates a unique constraint.
FossilOrigin-Name: c4845a3b591723ff60b7b1da198f44908c12bdfc
2015-02-04 19:20:42 +00:00
dan
738a3b2fcb Avoid a linear scan of the entire table when ota updates or deletes a row from a table with an external primary key index.
FossilOrigin-Name: 1db198ccca1e5c5a922cefe3daeff8d2e5d3a7f7
2015-02-04 16:32:47 +00:00
dan
1e35850229 Fix a memory leak that could follow an OOM error in ota.
FossilOrigin-Name: 0d5415f26427d0af89663c5a3e944e488143b648
2015-02-04 11:08:47 +00:00
drh
1dae26bdab Fix a typo in the --help output for speedtest1. Fix a dependency error
in the Makefile.in for speedtest1.

FossilOrigin-Name: f30a057aeeac2b863493b6325325b075a76b9d21
2015-02-03 19:20:03 +00:00
dan
e2863b6074 Fix some problems surrounding WITHOUT ROWID tables with DESC primary key indexes
.

FossilOrigin-Name: a21fefb79a161e6bb057ae4f6ba554f659706ac1
2015-02-03 18:43:42 +00:00
dan
75fda9b395 Remove "PRAGMA ota_mode".
FossilOrigin-Name: 1c111447a07687c30ed4ad5a6c27a169c85b7ea6
2015-02-03 15:56:08 +00:00
drh
67e65e55ab Break out the (script-generated) pragma parsing tables into a separate file,
pragma.h, to make editing easier.

FossilOrigin-Name: 32c0325bcb083fe3f0f0cfe999d00f754e15299e
2015-02-02 21:34:54 +00:00
dan
3b660d7da3 Have ota use imposter tables to write to indexes instead of the sqlite3_index_writer() interface. The error handling in this version is broken in a few small ways.
FossilOrigin-Name: cdaeab467f6aa3217be161377a9b78a4eec37093
2015-01-31 20:42:04 +00:00
drh
161a6845f9 Merge in support for the index_xinfo pragma.
FossilOrigin-Name: f9b6dc77021ee421bffd5697d5d337d3bbd07eb9
2015-01-31 02:34:23 +00:00
drh
c228be5b1f Add the "index_xinfo" pragma. Add new columns to the "index_info" and
"index_list" pragmas.

FossilOrigin-Name: 30f51d7b3b292191e8351223242e708bb7f3dfa6
2015-01-31 02:00:01 +00:00
drh
0a3105c25f Merge the SQLITE_TESTCTRL_IMPOSTER changes from trunk.
FossilOrigin-Name: 3ed6eb2fab5d95709ef392170339e6dd5ba13971
2015-01-30 21:00:10 +00:00
drh
1ffede8c86 Change SQLITE_TESTCTRL_INITMODE to SQLITE_TESTCTRL_IMPOSTER. Revise the order
of parameters.  Give it the ability to reset the schema parse table so that
imposter tables can be erased.

FossilOrigin-Name: 42d5601739c90434e5adfda8fa99ef7b903877db
2015-01-30 20:59:27 +00:00
drh
3102aa01fd Merge all recent trunk changes, and especially the SQLITE_TESTCTRL_INITMODE
enhancement.

FossilOrigin-Name: 36436dde74ce2536a9a430b4458216499ad113bf
2015-01-30 16:36:17 +00:00
drh
0699f29a14 Added SQLITE_TESTCTRL_INITMODE for improved testability.
FossilOrigin-Name: 98e029134dc1300d3ecb48b41b5107ec69ba85db
2015-01-30 15:52:26 +00:00
drh
917682a4f4 Add a few simple test cases for SQLITE_TESTCTRL_INITMODE - cases which
also test PRAGMA integrity_check.

FossilOrigin-Name: 3a6e2afe408d2b0c8166d00def2048568169d87a
2015-01-30 15:40:15 +00:00
mistachkin
fdc2e6d344 Fix some duplicated test names.
FossilOrigin-Name: 1797158db2a818134c5cba1578f69ed85948b980
2015-01-29 19:27:31 +00:00
dan
976b003344 Ensure that "PRAGMA wal_checkpoint = TRUNCATE|FULL|RESTART" block on other connections and truncate the database file as required even if the entire wal file has already been checkpointed.
FossilOrigin-Name: 53429689d4fcf472edbc89cc50b5e69ba3270634
2015-01-29 19:12:12 +00:00
drh
6267920b09 Split up the SRC variable in Makefile.msc to avoid over-long cmd.exe commands when TOP is set to a long pathname.
FossilOrigin-Name: 7d70ac65c16f08832a1f0fc4dec0f62a17cbcc85
2015-01-29 18:38:05 +00:00
drh
8964b34551 Add the INITMODE test-control.
FossilOrigin-Name: 5940af8e7872209ce41feb958643b23f7e55d258
2015-01-29 17:54:52 +00:00
dan
88392bf3ce Optimize range constraints on the rowid column of fts3/4 tables even if there is no MATCH clause in the query.
FossilOrigin-Name: 85dc12625d300fe48f3c096f54ebcb8b6ef4e30a
2015-01-29 11:52:22 +00:00
drh
3e6bc3977f Add missing VdbeCoverage() macros to the sqlite3_index_writer() implementation.
FossilOrigin-Name: 6f8cda26e93f09eadf0b084131a1d4002d94d959
2015-01-28 20:37:03 +00:00
dan
5c08eb143f When a "full", "restart" or "truncate" checkpoint is attempted, return SQLITE_BUSY if a reader prevents the checkpointer from copying any frames at all into the database file.
FossilOrigin-Name: f270004016ef20f1963e0f1ad32e76bcbaeb6798
2015-01-28 15:30:03 +00:00
drh
25876016a3 Correctly detect errors returned by walCheckpointStart() due to OOM.
FossilOrigin-Name: 8e878c20238ecf60e5d98d088a955e834ffd35c1
2015-01-28 12:27:35 +00:00
drh
120b3a4f61 Merge in all changes from trunk.
FossilOrigin-Name: 17c69be80542c5f84e21d60df3edc49422b087d9
2015-01-28 12:00:40 +00:00
mistachkin
e4a0d79b8a Fix harmless compiler warnings.
FossilOrigin-Name: e7d2ec048c88237c124fbe598f8f7e950d43d90f
2015-01-27 21:24:33 +00:00
dan
6f0138e89e Fix a bug in the fts3 snippet() function causing it to omit leading separator characters from snippets that begin with the first token in a column.
FossilOrigin-Name: adc9283dd9bc3a6463f8c4fe23dd58a3712c349d
2015-01-27 19:01:26 +00:00
dan
18f6ff9eb7 Improve the performance of fts3/4 queries that use the OR operator and at least one auxiliary fts function.
FossilOrigin-Name: 245e8730451fbdc1c729beff7295c452df604009
2015-01-27 18:43:02 +00:00
drh
a58d4a9612 Fix a (almost always harmless) read past the end of a memory allocation
that comes about because the Expr.pTab field is checked on an
EXPR_REDUCEDSIZE Expr object before checking the Expr.op field to
know that the Expr.pTab field is meaningless.

FossilOrigin-Name: e098de691002a78270540430b0df1e120582b53f
2015-01-27 13:17:05 +00:00
drh
1466e84187 The va_list argument cannot take on a NULL value and cannot be compared with
NULL on some platforms (ex: ARM).  So do not attempt to do so.

FossilOrigin-Name: 1964e656b4b420e8d6a4ba12d270ed02db292b88
2015-01-25 20:19:53 +00:00
drh
81cda6460c In the command-line shell, make sure stderr is unbuffered so that it
automatically flushes.  This has always been the case already for unix and
on Windows when the output is a console, but apparently was not the case
on Windows when the output was a pipe.

FossilOrigin-Name: 2a9ea9b4a7d6904efb2112e32efe84123dfa75d7
2015-01-24 12:12:57 +00:00
drh
2b8c5a0039 Make sure errors in the FROM clause of a SELECT cause analysis to abort
and unwind the stack before those errors have a chance to mischief
in the "*" column-name wildcard expander. Fix for ticket [32b63d542433ca67].

FossilOrigin-Name: 9e6eae660a02303fd140dac5fbff82364f4120cd
2015-01-22 12:00:17 +00:00
drh
1d9be4f7d3 Change the undocumented ".selecttrace" command in the shell to accept
an integer bitmask rather than a boolean.

FossilOrigin-Name: bd63bf882c5a925f921adc9cf7425d2e7950f0b2
2015-01-22 11:29:25 +00:00
dan
ce8f53d447 Fix an assert() that may fail following an OOM error.
FossilOrigin-Name: 5f592359d6d41708da3b3ac9d987a1631bfa3d88
2015-01-21 17:00:57 +00:00
mistachkin
1b3ee49225 Fix harmless compiler warning seen with MSVC.
FossilOrigin-Name: 78c2e62bb4c529595aaaf2e1f5f26387ad977b1b
2015-01-21 00:51:08 +00:00
mistachkin
e45e0fb21c Enhancements to entropy generation for the Win32 VFS.
FossilOrigin-Name: 26190b3c63e18f3116deeb59a58d9b5de48e8eea
2015-01-21 00:48:46 +00:00
drh
fe201effbe Fix another instance of an incorrect value for KeyInfo.nXField on a
sorting index.  Ticket [f97c4637102a3ae72b79].

FossilOrigin-Name: 0077f64510f9b9ce90032df2696cb242d097ab84
2015-01-20 03:04:29 +00:00
drh
1cc70e2358 Ensure that the KeyInfo.nXField value for ephemeral tables used to implement
ORDER BY or GROUP BY clauses is set correctly, so that the
sqlite3VdbeFindCompare() routine can choose the correct comparison function.
Add assert() statements to the high-speed comparison functions to detect
cases where they are inappropriately chosen.
Fix for ticket [f97c4637102a3ae72b7911].

FossilOrigin-Name: f7201bb0cdc9e1425c68599b32434de2231dca36
2015-01-19 21:36:05 +00:00
drh
59b1b58b66 There are asserts in place now that will prevent a recurrence of
ticket [f97c4637102a3ae7].  Nevertheless, it is good to add some
test cases as well.

FossilOrigin-Name: e02959b9a0e1bacdd3939548d4434c042aacc2e6
2015-01-19 21:10:53 +00:00
drh
3f39bcf5bc Make sure that the KeyInfo.nXField value of ephermeral tables used for
ORDER BY and GROUP BY is set correctly, so that the correct comparison
function can be choosen by sqlite3VdbeFindCompare().

FossilOrigin-Name: c16bae5e699b851f4ca8414c5dfa5370b18f69f0
2015-01-19 20:59:34 +00:00