Commit Graph

16094 Commits

Author SHA1 Message Date
dan 4dbc65b29a Add an incremental optimize capability to fts5. Make the 'merge' command independent of the 'automerge' settings.
FossilOrigin-Name: 556671444c03e3afca072d0f5e9bea2657de6fd3
2016-03-09 20:54:14 +00:00
dan 57ebc84a6e Fix a problem in fts3/4 that was causing it to discard data cached in-memory if an 'optimize' command is run when there is no data on disk. The usual way this would happen is if the very first transaction that writes to the fts3/4 table also includes an 'optimize' command.
FossilOrigin-Name: 79338b991bf01e81d336790ca87a0fa747da4ff3
2016-03-09 18:17:42 +00:00
drh 69c355bd9a Slight simplification to the query optimizer logic associated with IN (SELECT).
FossilOrigin-Name: 2c55c3c2950cafdc256ab540f60dc4609b9c354b
2016-03-09 15:34:51 +00:00
dan ab8aa11b96 Add another test case for bug [5e3c8867].
FossilOrigin-Name: d91e57e49f23414ec9211b775eb11cd6230a4f96
2016-03-09 15:14:54 +00:00
drh 90730c9e68 When optimizing expressions of the form "x IN (SELECT ...)" make sure that
the subquery is not correlated.  Fix for ticket [5e3c886796e5512].

FossilOrigin-Name: 1ed6b06ea3c432f920fb2b66b6042be906c5d21c
2016-03-09 15:09:22 +00:00
drh 7c621fb967 Automatically disable SQLITE_ENABLE_EXPLAIN_COMMENTS if SQLITE_OMIT_EXPLAIN
is defined.

FossilOrigin-Name: 8d4b6b2b519a80f831d64345ac26db825b0e2ebe
2016-03-09 13:39:43 +00:00
drh bacbbccd16 In the query planner, make sure OOM errors are reported up into
whereLoopAddVirtual() so that it shuts down appropriately.

FossilOrigin-Name: a13c59d08bcbc6f26ce6ac761a892eff8f035201
2016-03-09 12:35:18 +00:00
drh c5644346b6 Disable the bestindex*.test modules when building without virtual table support.
FossilOrigin-Name: e0bac2f3eed900d3a26de339fb7d5963f9b47724
2016-03-09 11:59:16 +00:00
drh d93b2b840d Simplifications to the memjournal.c logic to facilitate testing.
FossilOrigin-Name: 8baa2c2c7698e03418531482a8314a5d7ae2c7d3
2016-03-09 04:17:17 +00:00
drh 769b4c95ca Move the write failure test in memjrnlCreateFile() to just after the
actual write, thus reducing the number of instances of the test by one.

FossilOrigin-Name: 7f00d80c63b15376391f661d872f2b29a970702d
2016-03-09 03:44:32 +00:00
drh c1fb2b87bd Update a comment in btree.c to account for WITHOUT ROWID tables. No code
changes.

FossilOrigin-Name: fa20dcb03b92be3bb32f8e3d6f88681ace3f6c84
2016-03-09 03:29:27 +00:00
drh 2f1e02e8a7 Change a branch made obsolete by recent parser enhancements into an assert().
FossilOrigin-Name: ee486ef742557244f532e8d3b3604ff04e024b8a
2016-03-09 02:12:44 +00:00
drh 273021d71a Add an #ifdef and an ALWAYS() for coverage.
FossilOrigin-Name: 069337a922867ad0d023f5bf36e13ea46e047000
2016-03-09 02:03:03 +00:00
drh d1cca3b721 Change an unreachable branch in the virtual table query planner into
an assert().

FossilOrigin-Name: 73b97b9ec3c39ab2828ae6353b5d7e04a27996c9
2016-03-08 23:44:48 +00:00
drh 3349d9bea9 Improved comments on virtual table query planning. Added many new
WHERETRACE() macros.

FossilOrigin-Name: 4c89c2534abcf67bc486d5a900a84a6c4f59537e
2016-03-08 23:18:51 +00:00
drh c629e63a55 In memjournal.c, reuse the same sqlite3_file object for both the in-memory
phase and the on-disk phase.

FossilOrigin-Name: e7fbbdc25c0991d4e58d78a5fcb7386e1aa7f3af
2016-03-08 17:59:19 +00:00
dan 7ed4020890 Modify the memjournal.c code to make it a bit smaller.
FossilOrigin-Name: d99ac4154812065eef26c298de52954d7ee0bd75
2016-03-08 17:44:08 +00:00
drh 33b104af08 Drop support for SQLITE_EXTRA_DURABLE. The new SQLITE_DEFAULT_SYNCHRONOUS
compile-time option is a more general replacement.

FossilOrigin-Name: f6d3156ba9af1da517dd77c1df03fa7869888463
2016-03-08 16:07:59 +00:00
drh 15d36c603d Remove an unused goto label in the RBU extension.
FossilOrigin-Name: 2179a106e8dd7943d4f37093e65ce7826720904e
2016-03-08 16:02:37 +00:00
dan d0b8b664bd Add a new row type to RBU (a peer of insert, update and delete) - "delete then insert".
FossilOrigin-Name: 1d9468d2427d2c9b7240b364554ac85a0b62fa44
2016-03-08 15:52:43 +00:00
drh 9219bf9839 Add the SQLITE_DEFAULT_SYNCHRONOUS and SQLITE_DEFAULT_WAL_SYNCHRONOUS
compile-time options.  Automatically switch to the WAL_SYNCHRONOUS setting
when first opening a WAL-mode database if the synchronous setting has not
been previously set by the application.

FossilOrigin-Name: 5a847a676e756bbe33436596d4279f339bfb247c
2016-03-08 15:47:47 +00:00
dan c7dbce0f2a Update fts3/4 so that the 'merge=X,Y' command merges at least, instead of exactly, Y segments from a single level. This matches the documentation. 'merge=X,0' is, as it was in 3.11, an error.
FossilOrigin-Name: 64b3cb29159491cbfab7e01844b54408541ece5e
2016-03-08 15:37:48 +00:00
drh c2ae2073d9 Make the SQLITE_DEFAULT_SYNCHRONOUS and SQLITE_DEFAULT_WAL_SYNCHRONOUS
values zero-based to agree with PRAGMA synchronous.

FossilOrigin-Name: 592d2104361500e5002783ba329a2609389c57b9
2016-03-08 15:30:01 +00:00
drh e243de5cf5 If SQLITE_DEFAULT_WAL_SYNCHRONOUS is not the same value as
SQLITE_DEFAULT_SYNCHRONOUS and the application has not run
"PRAGMA synchronous", then set synchronous to the 
SQLITE_DEFAULT_WAL_SYNCHRONOUS setting when entering WAL mode for
the first time.

FossilOrigin-Name: 5791407b523abd24e832fc2361b3e9f01ee2f36a
2016-03-08 15:14:26 +00:00
drh 50a1a5aaca Add compile-time options SQLITE_DEFAULT_SYNCHRONOUS and
SQLITE_DEFAULT_WAL_SYNCHRONOUS used to specify the default synchronous
settings for all database connections.

FossilOrigin-Name: 1fefa967aa93372d232b96b1e0232b7b855d6d00
2016-03-08 14:40:11 +00:00
drh 6702f761ea Fix ATTACH to use the symbolic name PAGER_SYNCHRONOUS_FULL rather than
an integer literal.

FossilOrigin-Name: c4e192a0e5a408e198dbacb2752859a00d2b572f
2016-03-08 14:16:23 +00:00
drh 0dba3304f6 Fix comments on pager flag settings to include synchronous=EXTRA.
FossilOrigin-Name: 3a65a1fc0fd2408c6984153801ec5dcd5211c897
2016-03-08 13:56:02 +00:00
drh 6de32e7cdb Simplified error detection in the xBestIndex processing.
FossilOrigin-Name: 82ca2131b670505578628687746135ac413d156b
2016-03-08 02:59:33 +00:00
drh 8426e36c8f Add the ALLBITS macro as a shorthand for "(Bitmask)(-1)".
FossilOrigin-Name: 91bd619d27e4d91510a187bbb88de961a31c8a2e
2016-03-08 01:32:30 +00:00
drh 599d576456 Add a NEVER() to the code generator. Change the parameter name "mExtra"
to "mPrereq" in the query planner, to more closely reflect its meaning.

FossilOrigin-Name: 721ae51e443647291f3a8f7f2128aa410fee2682
2016-03-08 01:11:51 +00:00
drh fb826b8c13 Changes so that some assert()s in the virtual table query planner are
correct even following an OOM error.

FossilOrigin-Name: 9805f6f85211dcb5a0ab3ceca204e6f2e48530ea
2016-03-08 00:39:58 +00:00
dan 108b7953ed Update fts3/4 so that the 'merge=X,0' command merges X pages from all segments of the first level in the fts index that contains 2 or more segments.
FossilOrigin-Name: cddf69dbc46f10ee7e87538dd850e086386b544c
2016-03-07 20:14:27 +00:00
drh 237b2b7111 Avoid a NULL pointer dereference following an OOM while generating code
for IN operators on virtual tables.

FossilOrigin-Name: c924008692e35f1f5144830af08d6de051dd21dd
2016-03-07 19:08:27 +00:00
drh c5c67abb9a Merge the virtual table query planner enhancement, the RTREE cost estimate
fix, and the statement journal spill delay enhancement from trunk.

FossilOrigin-Name: 17fd8f3cf0ec565e08403dc8e10a1cffc2bbe165
2016-03-07 17:49:17 +00:00
dan e45216fd9d Add a new row type to RBU (a peer of insert, update and delete) - "delete then insert".
FossilOrigin-Name: 169311c85b30f625bdb6986c9cd11db70942d73b
2016-03-07 17:39:30 +00:00
drh 8c71a98ce1 Add the SQLITE_CONFIG_STMTJRNL_SPILL option for sqlite3_config().
FossilOrigin-Name: b6c4202432dc96f8f1740f52d0bf872116357fcc
2016-03-07 17:37:37 +00:00
dan 104ead923e Fix a problem in the previous commit affecting queries with three or more tables joined together to the right of a LEFT or CROSS JOIN operator.
FossilOrigin-Name: d8d89d69a490a708b83147945f74134ae0e4b387
2016-03-05 21:32:14 +00:00
dan 6a1e076939 Change the way SQLite invokes the xBestIndex method of virtual tables so that N-way joins involving virtual tables work as expected.
FossilOrigin-Name: 195444380bafd3d95d37ad83047c75ca20978de4
2016-03-05 21:07:49 +00:00
drh 2ea74dc805 Adjust the cost estimates for RTREE such that the expected number of rows and
expected cost is halved for each additional constraint.

FossilOrigin-Name: fd7cd0609381a85673d1f737ebeb19dde3de180f
2016-03-05 20:28:24 +00:00
dan 115305ff00 Change the way SQLite invokes the xBestIndex method of virtual tables so that N-way joins involving virtual tables work as expected.
FossilOrigin-Name: ffc65968ede2c402e616147e6e3d737e6f9de21d
2016-03-05 17:29:08 +00:00
drh c2f18adde5 Remove the unused journal.c source file (its function have been subsumed into
memjournal.c).  Refactor some of the names in memjournal.c.  No functional
changes.

FossilOrigin-Name: 5f2a262d3f6b1531001326faf1d3b3d92c20a30a
2016-03-05 15:35:09 +00:00
drh 65a7e769e7 Work around (incorrect) ASAN warnings in memjournal.c.
FossilOrigin-Name: 4de09777dad6188b7e897473700af3c9655e8547
2016-03-05 15:03:31 +00:00
drh 07eab3b87f Fix an integer size mismatch problem in test_bestindex.c
FossilOrigin-Name: 2e35eb6b7464455467c868adfbcaad4da16d3207
2016-03-05 14:19:32 +00:00
drh 14bfd99143 Fix an incorrect #ifdef on sqlite3LogEstToInt().
FossilOrigin-Name: dca7b23354a6b08c926b6ed3f7345d942a409862
2016-03-05 14:00:09 +00:00
drh 6f17c09fcf Fix an assert() in sqlite3VarintLen(), even though it is impossible to hit
in SQLite due to the way sqlite3VarintLen() is used.

FossilOrigin-Name: 251424c5869f43012fc1e1a545de362036b883db
2016-03-04 21:18:09 +00:00
drh 2606aca80f Merge recent enhancements from trunk. Default page size is 4096. Writes
to statement journals are avoided.

FossilOrigin-Name: 456df3365e2df60e34762f2024bb551538b3f72b
2016-03-04 16:42:43 +00:00
drh 3298a641a2 Defer opening and writing statement journals until the size reaches a
threshold (currently 64KiB).

FossilOrigin-Name: cb9302cca423de41305719a49208daa392ec09da
2016-03-04 14:43:44 +00:00
drh 3ac9a86415 Update test cases to taken deferred statement-journal opening into account.
FossilOrigin-Name: 5b2fe5219ab9ad15969e3374894a75979b65cb3c
2016-03-04 14:23:10 +00:00
drh 14520bfd23 Merge changes from trunk.
FossilOrigin-Name: a87305dfd49ee17632d0bce66ce7c2e9407b7b3e
2016-03-04 13:08:35 +00:00
drh 94580868f5 Change the default cache_size to -2000 (which means 2000*1024 bytes
independent of page_size).

FossilOrigin-Name: 2682e8e413fadbca0673f242769af17bfd291559
2016-03-04 04:01:43 +00:00
drh 9878fefd6f Change the default page size for new database files to 4096 (from 1024).
Except, when building the testfixture, preserve the legacy page size.
Also fix a comment on SQLITE_MAX_ATTACHED.

FossilOrigin-Name: 2e8a9ca9d3d6efddc31f01074d14acae56568c37
2016-03-04 03:43:10 +00:00
drh e808d7c1fe Detect the presence of pread()/pwrite() system calls on unix systems and
use them if available.

FossilOrigin-Name: 82cbf5ad2ed988a006106e188e98096a52e6779d
2016-03-04 03:20:05 +00:00
drh 79a2ca3944 Further fixes to the pread()/pwrite() enabling logic.
FossilOrigin-Name: 38fb54e7854ac0500a88585ff9dd7487b4b2e586
2016-03-04 03:14:39 +00:00
drh a46cadc42e Fix the build for cases when pread()/pwrite() are not available.
FossilOrigin-Name: 7d67d876b70c7a4199697c5b112d809c600e140e
2016-03-04 03:02:06 +00:00
drh ddebf16f1f Add the test_bestindex.c file to Makefile.in and Makefile.msc so that
"make test" will work again.

FossilOrigin-Name: 6ec6b6a97e62be1abe1e349b5bc04c6f5ae88968
2016-03-04 02:59:35 +00:00
drh e32a256acd Update the configure script to detect pread/pwrite and update os_unix.c to
use those routines if they are available.

FossilOrigin-Name: 2cffb9e50bed77d1079603f5b4a71b7559de7294
2016-03-04 02:38:00 +00:00
drh ff6b826631 Get in-memory subjournals working for builds without SQLITE_ENABLE_ATOMIC_WRITE.
FossilOrigin-Name: b5378dcea53d4cd1744d13ddee5e50869607b771
2016-03-04 00:13:29 +00:00
drh a05fc913ab Merge the latest updates from trunk.
FossilOrigin-Name: 55c00f716dc98b188c91f3a5a010242c9497785f
2016-03-03 21:29:10 +00:00
drh 862acaa3f4 Reduce the amount of heap memory required to store many schemas by storing
the column datatype appended to the column name (with a \000 separator), 
rather than in separate memory allocation.

FossilOrigin-Name: 16fbf2e19c22df9441aef5c8b7f5670adc38a6b6
2016-03-03 21:22:53 +00:00
drh 2b33f6e775 Allow the left-hand side of IN operators on virtual tables to have the
aConstraintUsage[].omit flag clear.

FossilOrigin-Name: 3eb74342740cd393e03aa38cd01690ccab173b76
2016-03-03 20:42:18 +00:00
drh 5b38201708 Merge 3.11.1 changes into trunk.
FossilOrigin-Name: 7abc2dd953477797fa05421b061d73596aa025fb
2016-03-03 17:54:30 +00:00
drh c5c1507612 Version 3.11.1
FossilOrigin-Name: f047920ce16971e573bc6ec9a48b118c9de2b3a7
2016-03-03 16:17:53 +00:00
drh 2396fce54e Increase the default upper bound on scope to 30.
FossilOrigin-Name: b1258814f6100f594210775e9e3007b5b0c65025
2016-03-03 15:16:15 +00:00
dan b78b83a2f6 Add new test script bestindex1.test to the utf16 permutation.
FossilOrigin-Name: 5893e97244126c80762e55249461f21a4e81bb70
2016-03-02 17:57:53 +00:00
dan 512c09b0bd Add an extra test for the change on this branch.
FossilOrigin-Name: d2d28251566d2a0ec1a07fe5b8ed047136840bfd
2016-03-02 16:13:53 +00:00
dan 9cc24c8002 Enhance test_bestindex.c so that it can be used to test plans generated by xBestIndex.
FossilOrigin-Name: 3c15a9bf45cd7dae2fbd99123b8dd75ce278d6e4
2016-03-02 16:01:41 +00:00
dan 341b20fb12 Fix a recently introduced problem in permutations.test causing an error when the QUICKTEST_OMIT environment variable is defined.
FossilOrigin-Name: 45bc9557722cc2a1398a53fdb2acd8b6692f3121
2016-03-02 15:37:50 +00:00
dan e18ec6acc2 Fix an error in an fts5 test script.
FossilOrigin-Name: b2a03e2d479aec2fc68dfc83a1fa34c740f44e13
2016-03-02 13:26:19 +00:00
drh dbc49161c0 Allow the left-hand side of IN operators on virtual tables to have the
aConstraintUsage[].omit flag clear.

FossilOrigin-Name: 1622623cbbfc4325c53d731aba78ca9c382ec612
2016-03-02 03:28:07 +00:00
drh 47784529cc Add the optional -DSERIES_OMIT_CONSTRAINT_VERIFY=0 option to the series.c
extension that implements the generate_series() virtual table.

FossilOrigin-Name: 3d9daa929c0abe6dc01e800ef343b0eef2f0c76a
2016-03-02 00:58:49 +00:00
drh 7434b1dbf4 New test cases and infrastructure for testing the xBestIndex method of
virtual tables.

FossilOrigin-Name: 1d41c161165006d6c2af47e476f05fb13039f8b8
2016-03-01 22:48:00 +00:00
drh 4fb48e4eb1 Improved debugging output with wheretrace. Fix some typos in test script
comments.

FossilOrigin-Name: 13a37fd487ce7d4f98a12f7a67a9c05dadc66557
2016-03-01 22:41:27 +00:00
dan 23c3c38dd6 Fix a memory leak in the test code on this branch.
FossilOrigin-Name: 7a1add56341f43dc41adc7b370e58860f4dd50a3
2016-03-01 18:35:55 +00:00
dan a3a44dd379 Allow test_bestindex.c to set the omit flag for a constraint.
FossilOrigin-Name: 759b9d5b22aa60cc1d6b606f81eb7366c28cbcbe
2016-03-01 18:24:36 +00:00
dan 8e4251b633 Add test code useful for testing the planners use of teh virtual table xBestIndex() method.
FossilOrigin-Name: de034c0db66298454ae8418949d58eb6e223c0de
2016-03-01 18:07:43 +00:00
dan bce50c734b Do not attempt to run fts5bigtok.test or fts5merge2.test if FTS5 is not compiled in.
FossilOrigin-Name: f7ed373953c2dea0919a85dfb461dfef512cd5fc
2016-03-01 16:56:26 +00:00
dan e82126c9d0 Add -DSQLITE_ENABLE_FTS5 to one of the release-test configurations in releasetest.tcl. Run fts5 tests as part of "make test" if SQLITE_ENABLE_FTS5 is defined.
FossilOrigin-Name: 3cee93716f2aece03bf9b835fb7b5294e4ddc176
2016-03-01 16:02:57 +00:00
drh fb02bad04f Remove a forgotten "breakpoint" command from an FTS5 test script.
FossilOrigin-Name: 61927c8f3156c6e61b768318b3cd3bcc4144e17b
2016-03-01 15:52:41 +00:00
drh 5ec04f0943 Increase the version number to 3.11.1
FossilOrigin-Name: 2dcd2fdafe933b74e2d90923986c5ee5791d8223
2016-03-01 15:41:31 +00:00
dan a93cd623cf Merge branch-3.11-matchinfo into this branch.
FossilOrigin-Name: 42358170b35cc3e25c42f20e56f3f67e809001ba
2016-03-01 15:09:15 +00:00
dan b1e8d31edf Fix a problem in fts5 where a corrupt db could lead to a (huge) buffer overread. Cherrypick of [c9a30e117f].
FossilOrigin-Name: daef5869f4d62ebb24eb03b79fe4be0812fa0496
2016-03-01 14:51:36 +00:00
dan 45a0e4eb59 Fix an fts5 problem causing 'optimize' to corrupt the fts index under some circumstances. Cherrypick of [251d6473f7].
FossilOrigin-Name: 5b1b7ab5d67f3d691e52ba57dbc14c52d90c6631
2016-03-01 14:50:55 +00:00
drh 889cb33b8f Better estimatedCost in the xBestIndex method of the generate_series vtab.
FossilOrigin-Name: f2c16094a536e7ef62444d0fe38cbee2a4999426
2016-03-01 02:11:50 +00:00
dan 6e76326d18 When using a temporary file for a statement journal, store the first 64KiB in memory. If the file grows larger than that, flush it to disk and free the memory. Hardcoding to 64KiB is just an experiment to check that the memjournal.c code works.
FossilOrigin-Name: 44b2dc18e200e87cf062cb8f1659727c53fa36e9
2016-02-29 20:18:21 +00:00
dan 5f37ed5121 Fix minor problems with new code in memjournal.c.
FossilOrigin-Name: 9fd3f7b9c93325a83cdbe7dc9ee312b22a9c2898
2016-02-29 20:00:13 +00:00
dan 4e9d0d5418 Fix a problem in fts5 where a corrupt db could lead to a (huge) buffer overread.
FossilOrigin-Name: c9a30e117f2c6c9ef0cc0c6ca5227d2961715b8f
2016-02-29 17:34:16 +00:00
dan 437a54eaba Fix an fts5 problem causing 'optimize' to corrupt the fts index under some circumstances.
FossilOrigin-Name: 251d6473f7c9ad95adbdcc49cb8eaf7c0956764b
2016-02-29 17:16:26 +00:00
drh 94eaafa9ce Reduce the amount of heap required to store many schemas by storing each
column datatype appended to the column name, rather than as a separate
allocation.

FossilOrigin-Name: 842b21162713bb141b845b01c136457a31af4ab0
2016-02-29 15:53:11 +00:00
drh 743606c3d3 Very minor improvement to the performance and reduction in size to the
parser by capturing the name and datatype of table columns in a single
grammar rule reduction.

FossilOrigin-Name: 4b55c520f554163edc174e5995e66242f169cb04
2016-02-29 13:44:38 +00:00
drh 986dde7052 Further simplifications to the grammar.
FossilOrigin-Name: 519fd03b845c9b53df9e5397282df2e99f36a672
2016-02-29 13:37:21 +00:00
drh 2881ab6298 Update the parser so that it pulls out the column name and type all in one
go, rather than using separate reductions.

FossilOrigin-Name: ad3ffe2eec8e8ea2591a78c723d2665735553cb0
2016-02-27 23:25:36 +00:00
drh 94fa9c414a Eliminate the need for the Column.zDflt (using Column.pDflt instead) to reduce
the amount of memory needed to hold the schema.

FossilOrigin-Name: d8c94a46dfa94930732c2de2aa79675c5087d36e
2016-02-27 21:16:04 +00:00
dan 2491de28f1 Extend the code in memjournal.c so that it subsumes the role of journal.c. And (untested) can flush journal or statement journal files to disk after they grow to a specified size.
FossilOrigin-Name: e0b0b4316531fc8afa74b4882d9c74a91030ec69
2016-02-27 20:14:55 +00:00
drh fc1a84c57b Tighter description of I/O stats in the shell. Show I/O stats on speedtest1.c.
FossilOrigin-Name: f681d800340e0e710f73d0f7c09101f899249183
2016-02-27 19:19:22 +00:00
drh 3478490332 Enhance the ".stats" command in sqlite3.exe to show one-time stats information
if invoked with one argument.  Also show /proc/PID/io information if run on
Linux.

FossilOrigin-Name: 3c36948f16b58fe8042c37d0df634308b4e48217
2016-02-27 17:12:36 +00:00
drh 4f8f5e4446 Fix a requirement mark to conform to a typo fix in the documentation.
FossilOrigin-Name: d1392c627934b89cdb86d82e73d56e8f76952b30
2016-02-27 14:04:27 +00:00
drh d892ac97bb Enhance documentation of sqlite3_snapshot_open() to explain that the database
connection must have participated in at least one read operation prior to
the beginning of the transaction for which the snapshot is to be opened.
Add test cases for this fact.

FossilOrigin-Name: 33dd671cb9c17f08dbc61aed91e80eaeb84bfaf5
2016-02-27 14:00:07 +00:00
mistachkin fe41a98fd6 Add 'Replace.exe' to the MSVC clean target.
FossilOrigin-Name: c2277fab12d2aecf9e0f69683741a194df17e854
2016-02-27 00:21:44 +00:00
mistachkin 62ab810014 Fix typo in ICU error message.
FossilOrigin-Name: 00c8fffd47cec763857389e1e91c026ba3179182
2016-02-27 00:21:16 +00:00
drh fee1e8d317 Make sure the Replace.cs file is included in the autoconf tarball.
FossilOrigin-Name: b850df483d4dfc677ec61b119d8c1162b6a823d6
2016-02-27 00:07:18 +00:00
mistachkin 9aeb971ceb Support generating the '.def' file using the autoconf Makefile for MSVC.
FossilOrigin-Name: 3617564cb630ed418badf43d2c0291c11c166d12
2016-02-26 23:13:16 +00:00
drh 88a1650859 Fix a potential buffer overflow in the ICU upper() function.
FossilOrigin-Name: b8dc1b9f5d413000387bfe784b69f5d0ee5c0489
2016-02-26 21:20:57 +00:00
mistachkin fe663fdecb Further refinements to the MSVC batch build process.
FossilOrigin-Name: cf4e4fbdb6a29b7fbd5150958ab4f8f2a1cd7f21
2016-02-26 21:03:16 +00:00
mistachkin 9b88ace822 Further refinements to the MSVC batch build process.
FossilOrigin-Name: 4e54e9c0fefe417f94a2d95921acf61b1dda5ca4
2016-02-26 21:01:37 +00:00
dan 38c3d3d8a5 Fix the ICU extension LIKE function so that it does not read past the end of a buffer if it it passed malformed utf-8.
FossilOrigin-Name: 424b7aee3310b9782bd312589dc3d9f287aa04b8
2016-02-26 16:03:29 +00:00
drh d42908fb0e Provide the new SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER option to
sqlite3_db_config() that can be used to activate the two-argument version
of fts3_tokenizer() for a specific database connection at run-time.

FossilOrigin-Name: 374b5108087a2eae03676c0f3469b37a272145bf
2016-02-26 15:38:24 +00:00
drh 5f7d411e98 Fix a typo in a comment (though an important comment in that it is used
to generate documentation).

FossilOrigin-Name: ff3d7f845e1875d6729f64f5231db1c376892f31
2016-02-26 13:22:21 +00:00
drh 26bcc7cf40 Ephemeral tables used to hold manifested views may not be unordered since
they might be subject to an ordered comparison if they are part of a join.

FossilOrigin-Name: 3ef6a3153267d5328202fea24fd29ff4d5409295
2016-02-26 04:13:39 +00:00
drh c9eaeef1fe Remove a debuggin "exit" command mistakenly left in the "where.test" module.
FossilOrigin-Name: beda0b8c76c2c7328a44156257c978cf8f5df59b
2016-02-26 04:04:07 +00:00
mistachkin 74c2f06668 Add some comments in the VSIX test tool.
FossilOrigin-Name: c871473ffee6dbb0f5b47f1c1329c84b902368ae
2016-02-25 23:27:02 +00:00
mistachkin a85ac12d00 Add tool for smoke-testing the UWP VSIX package.
FossilOrigin-Name: d27f32c6d72182198ae6d6cf8e385be76335dc65
2016-02-25 23:25:00 +00:00
mistachkin 7856c1c0eb Enhance checking of prerequisites in the vsixtest tool.
FossilOrigin-Name: 799d5f09ed058898167e43bd9c8d1bf8c5df23ba
2016-02-25 23:22:26 +00:00
drh 8c098e61b6 Fix an incorrect cost computation for sorting (introduced just a few
check-ins ago).  Should be NlogN, not NloglogN.

FossilOrigin-Name: 2459d3238853951bc3a507dd975e7ec921cf8446
2016-02-25 23:21:41 +00:00
mistachkin 9d970c3c93 Small optimization in FK handling.
FossilOrigin-Name: e0d25913b73a813f5987aa70b364b00f19351663
2016-02-25 21:38:28 +00:00
drh 27b6649f39 Change the srcck1.c utility program to use only unsigned characters.
FossilOrigin-Name: d64d005eb5df2e3eb1248fc8eff8b1b683e48c74
2016-02-25 21:27:03 +00:00
drh d566c95179 Change the "PRAGMA stats" command to report size values in LogEst units.
The eliminates the need for sqlite3LogEstToInt() unless non-standard
compile-time options are used, so leave it out except in those cases.

FossilOrigin-Name: 832c237fcbe83dd4f5a18a06acb0aeb7e2b9e712
2016-02-25 21:19:03 +00:00
dan aa9ffaba4a Disable the RESTRICT foreign key action if "PRAGMA defer_foreign_keys" is set.
FossilOrigin-Name: 9ffff484bb4b67c29dda6180d7d766ad13988fe1
2016-02-25 20:17:55 +00:00
dan fd37e67b16 Disable the RESTRICT foreign key action if "PRAGMA defer_foreign_keys" is set.
FossilOrigin-Name: 8fea1166016c659ece83e0045bc348f478a9ba6a
2016-02-25 19:52:11 +00:00
drh d3e1af4aa0 Merge all the latest changes from trunk.
FossilOrigin-Name: b86590043e17705ada90562cf30f69b3e3ef65a4
2016-02-25 18:54:30 +00:00
drh eecb80e77e Query planner improvements: Take the LIMIT into account when estimated the
cost of an ORDER BY.  Avoid automatic indexes on query loops that are expected
to run less than twice.

FossilOrigin-Name: bf46179d4484376909dce40ffcc06fecb19b3544
2016-02-25 18:40:18 +00:00
drh 5a6f5ede81 Improvement on the previous check-in: disallow automatic indexes for any
loop that is expected to run less than twice.

FossilOrigin-Name: aab53a21894ba51d325fd8f8f4bb4163ece74391
2016-02-25 18:22:09 +00:00
drh 87eb919d05 Do not use an automatic index on an outer loop that only runs once.
FossilOrigin-Name: 5957e793414ff80ed01a7a67e70c3fd096a3f6e0
2016-02-25 18:03:38 +00:00
drh c3489bbf77 Take the LIMIT clause into account when estimating the cost of sorting.
FossilOrigin-Name: d491745cab951e0de70f1f79b7640ea8aff6e8bb
2016-02-25 16:04:59 +00:00
drh d8c22ac655 In the command-line shell: When the ".import" command is creating a new
table using column names from the first row of CSV input, make sure 
double-quotes in the name are properly escaped.

FossilOrigin-Name: 2e67a1c823c7003e7d2619c7d8b6db6ce046c527
2016-02-25 13:33:02 +00:00
mistachkin 77b7e2afb1 Improve readability and logging of the vsixtest script.
FossilOrigin-Name: 4fe7c4e90b7adbb1630b4aa15709968a1fcc7d83
2016-02-25 08:02:16 +00:00
mistachkin 6ae4d84fdf Enable all steps and add/update comments.
FossilOrigin-Name: 788f99f47f40be42f30d3f324983f39e84d8cfbb
2016-02-25 02:56:53 +00:00
mistachkin c32db469f4 More work. Install and build steps are now tested.
FossilOrigin-Name: 0ab74373bd37d48d6afa7aecb67885afcd3a85b1
2016-02-25 02:49:58 +00:00
mistachkin 5dad68d3c7 Fix typo. Improve interim debugging.
FossilOrigin-Name: e0029bdf20df90abd8b81e5b08133866665b1c87
2016-02-24 23:31:14 +00:00
mistachkin 78007b2f22 Test build all supported configurations and platforms during VSIX testing.
FossilOrigin-Name: cce40a0b8ee792482fb7031113eb190ad316d01a
2016-02-24 23:25:23 +00:00
mistachkin 7aa3ebee0f Initial work on an automated VSIX testing tool. Not working or tested yet.
FossilOrigin-Name: 496e4ac984b2548dd5f2f969cd34656b586cfcfe
2016-02-24 21:42:03 +00:00
dan f769cd61b2 Extend [3e9ed1ae] so that covering indexes on WITHOUT ROWID tables are also identified.
FossilOrigin-Name: e721975faa0925be4029330550ff2a9666041ff7
2016-02-24 20:16:28 +00:00
drh 6ad224e91e Change a char* to const char* in order to suppress some harmless
compiler warnings.

FossilOrigin-Name: 56f62e34ae9d5c7db07367f0007df258b2e76bd2
2016-02-24 19:57:11 +00:00
drh 87993148bd When an index complete covers a table, it can be used as a covering index
even if columns past the 63rd column are indexed and accessed.

FossilOrigin-Name: 3e9ed1aea43e8ce2eb74bb845ea2c05b5882e36e
2016-02-24 17:18:51 +00:00
dan a73086dd9e Fix a problem with handling identifiers that start with "x" if SQLITE_OMIT_BLOB_LITERAL is defined.
FossilOrigin-Name: b65217c69c59cbe9cd1494e2eb42ecf22c336399
2016-02-24 16:14:07 +00:00
drh e1dd060898 Identify indexes that complete cover their table.
FossilOrigin-Name: 71d488b599cbde817de369efac4412569a55b43d
2016-02-24 15:43:05 +00:00
drh 0e0089679f Add the SQLITE_BITMASK_TYPE compile-time option.
FossilOrigin-Name: 0064a8c77b2b048c71277d1cfd1ba3975b513b70
2016-02-23 16:28:34 +00:00
drh b052958657 Remove code not needed now that synchronous=OFF database files no longer
trigger the use of a master journal.

FossilOrigin-Name: aa9f4c622af191edbeb6a535942944f8c91f5c37
2016-02-22 23:44:42 +00:00
drh 600e888454 Avoid an unnecessary seek operation some corner-case skip-scan operations.
FossilOrigin-Name: 2a6003a937a210dfc279e393d3a0b49d1f3ac92e
2016-02-22 23:14:11 +00:00
drh 0bf2ad6a18 Clearer presentation of the logic. No functional changes.
FossilOrigin-Name: a3dcf6db76cc09bdfedb1bbeba3b359b77762cbe
2016-02-22 21:19:54 +00:00
drh a6d2f8eb1e Avoid an unnecessary seek operation on some corner-case skip-scans.
FossilOrigin-Name: 38e837e605076124b73235e1fd832838d9545cb2
2016-02-22 20:52:26 +00:00
drh b9626cfa70 Always use the sqlite3VdbeDeleteAuxdata() routine for clearing auxdata on
function parameter, rather than having a separate deleteAuxdataFromFrame()
for doing the job for trigger frames.

FossilOrigin-Name: 64386fa339adb91439da979d74062f67a6ec68fd
2016-02-22 16:04:31 +00:00
drh 8e6cf0a7c5 Avoid creating a master journal unless two or more databases in the
transaction can actually benefit from that master journal.

FossilOrigin-Name: 3ed1890612bd45bd9c72f670d2cbb0b8fbd35d92
2016-02-22 14:57:38 +00:00
drh e872d5133d Change magic numbers associated with synchronous settings to named constants.
FossilOrigin-Name: 9230ba6c01f4a550d92a0cbbf36dbe81af14fbfc
2016-02-22 13:23:16 +00:00
dan 748e5cd6f9 Add an extra test case for the change in commit [c4295725].
FossilOrigin-Name: a48ac4c347813bd2b416b1cb06c3cbf1f4b3781a
2016-02-22 09:45:27 +00:00
mistachkin d149ea3a3a Further enhancements to the MSVC batch build tool.
FossilOrigin-Name: 06f1495f4b7465e3992f524f56d97847643a9895
2016-02-19 19:46:58 +00:00
mistachkin c03c2cf8b3 Use the arguments to NMAKE consistently in the MSVC batch build tool.
FossilOrigin-Name: 480e5049486b8b047f533d78b040daa47dd6b946
2016-02-19 19:29:44 +00:00
mistachkin 56362a5ab7 Enhance clean target in the MSVC makefiles.
FossilOrigin-Name: 66a9ad4a6df513f4c35c3d337d4e2e80cd38d586
2016-02-19 19:03:04 +00:00
dan 3200132add Use a separate list of aux-data structures for each trigger program at the VDBE level. Fix for [dc9b1c91].
FossilOrigin-Name: c4295725015d394f01b8563f47236e0890f1cc0d
2016-02-19 18:54:29 +00:00
drh b719e3a747 Enhance speedtest1 to display the particular version of SQLite under test.
FossilOrigin-Name: 0cb728c15c66f1bf09cc1e0731a95ba937c6c71c
2016-02-19 16:19:23 +00:00
drh e1ee002891 Fix a couple of harmless warnings generated by clang.
FossilOrigin-Name: a1a3ff1f53145c5a9fbf29398cf4a453729e71f0
2016-02-19 15:17:53 +00:00
drh b1f4efd20b Fix a harmless uninitialized variable access.
FossilOrigin-Name: 398522e686b34e7f82a62e62d8b0a0ea924de064
2016-02-19 14:20:46 +00:00
drh 81fd3497f4 Make sure WhereClause objects are fully initialized before use when
planning OR queries.

FossilOrigin-Name: 162053021795ff40c447498a76de4d31d58aa808
2016-02-19 14:10:44 +00:00
drh 9a1e85ee2e Fix (harmless) compiler warnings in some of the TCL-based test code.
FossilOrigin-Name: 7c26d2b47025edaa289bd4a383b5c1536482ec11
2016-02-19 13:29:52 +00:00
drh 469753d949 Add an SQLITE_DISABLE_INTRINSIC #ifdef to the sqlite3Put4Byte() function.
FossilOrigin-Name: ba9c6827d0890aaed9168c221fefbdbe89f4f9d3
2016-02-19 13:20:02 +00:00
drh 51381c208e Omit the unused yyzerominor constant.
FossilOrigin-Name: 60ad68a9f569d2446d76a6453be4fa1c4ed2cd93
2016-02-19 13:19:22 +00:00
dan 9e2cfad18a Add an "#ifndef SQLITE_AMALGAMATION" guard around a typedef in fts5_test_mi.c to avoid redefining "u32" if it is compiled as part of the amalgamation. Cherrypick of [f9c49ba1].
FossilOrigin-Name: ce0f1ed517e387ca6a687b805088d7c529cd257b
2016-02-19 10:19:43 +00:00
dan 92b859292d Add an "#ifndef SQLITE_AMALGAMATION" guard around a typedef in fts5_test_mi.c to avoid redefining "u32" if it is compiled as part of the amalgamation.
FossilOrigin-Name: f9c49ba1edf13cb8c48d73f1b2e3f80c46b3c030
2016-02-19 10:18:36 +00:00
mistachkin b0c99afeda Modify the MSVC batch build tool to support the MSVC autoconf Makefile.
FossilOrigin-Name: 72b10e5e7d2db436c7b03cc3735a2e9d0e53ab5d
2016-02-19 05:07:56 +00:00
mistachkin 9751730f83 Further improvements to the MSVC batch build tool.
FossilOrigin-Name: b9626b5954068ae2e7733dd14f906a1f6d7090a5
2016-02-19 00:48:23 +00:00
mistachkin b9076ba4c9 Further improvements to the MSVC batch build tool.
FossilOrigin-Name: 90dd6eb1fec22460473d670519d0e730bb37067d
2016-02-19 00:47:18 +00:00
mistachkin d8945d1707 Correct the install location for the UWP VSIX package.
FossilOrigin-Name: f74de325ffb01a1ca8ddd4f011188e38296c3402
2016-02-18 21:15:12 +00:00
mistachkin 45dc877f76 Correct the install location for the UWP VSIX package.
FossilOrigin-Name: b47d03027e973e3c8d77246a2d2100881f6a9bd2
2016-02-18 21:00:29 +00:00
dan 557d0383ff Remove SQLITE_TEST macros from fts5_test_mi.c. Add the SQLITE_FTS5_ENABLE_TEST_MI compile time symbol - to make it easier to create builds that include the fts5 matchinfo demo by default.
FossilOrigin-Name: e2ef6667772eeac6eee3aed5d0609c2a0ef5d8cf
2016-02-18 16:16:43 +00:00
drh b2bddbbc2d Avoid a potential buffer overrun if an SQL statement being parsed ends
with an illegal "!" token.  (This problem was detected by fuzzcheck
running under valgrind. The problem was introduced by check-in [9570b6b43df3].)

FossilOrigin-Name: 2a8d97e7c8976df0312e1294e8c1da8b15686654
2016-02-18 14:49:28 +00:00
drh 4c9d22819f Improved handling of the -v option on the fuzzcheck test program.
FossilOrigin-Name: c8cd7804dc905b2b20cd7c0192bcfaceaaa7e2a8
2016-02-18 14:03:15 +00:00
dan a0c2d3c155 Remove an unnecessary "include <tcl.h>" line from fts5_test_mi.c.
FossilOrigin-Name: 31d8b69e9e0747e573516570bfe2770384e99134
2016-02-18 13:32:34 +00:00
drh 5b081d8a28 Add extra API armor on the sqlite3_bind_blob() interface.
FossilOrigin-Name: 80de1ad5eb4c3839756b6467d5b8195b4abfb1f8
2016-02-18 01:29:12 +00:00
drh 7f149e5173 When VDBE opcodes fail, they cause an immediate exit from the loop, rather
than depending on the rc==SQLITE_OK test at the top of the loop.  This is
faster and smaller.

FossilOrigin-Name: 24c7151c1aabeaffcb8bb5836404e70a3ec4681b
2016-02-17 20:47:24 +00:00
drh 9467abf3dd Fix up all VDBE opcodes so that they cause an immediate exit on any kind of
error, and thereby eliminate the need to test "rc" at the top of the loop.
Resulting code is a little smaller and faster.

FossilOrigin-Name: a444633a827642bcf4d02a461e7e5f66769d39fd
2016-02-17 18:44:11 +00:00
drh b5a55ce77d Bump the version number to 3.12.0.
FossilOrigin-Name: c17d7276b8c114df5fe6e9ea14d59758443c281b
2016-02-17 15:01:18 +00:00
dan 5e29f38d2c Remove the "#ifdef SQLITE_TEST" condition from fts5_test_mi.c. Update fts5_main.c so that if SQLITE_FTS5_TEST_MI is defined when it is built the fts5_test_mi.c entry point is automatically called. This makes it easier to build versions of fts5 that include the matchinfo() demo by default.
FossilOrigin-Name: 87e6e225aea3a4d10476d16eab4a6403a4a128c9
2016-02-17 14:48:26 +00:00
dan 87d6b35541 Improve test coverage of demo code in fts5_test_mi.c.
FossilOrigin-Name: 8a78050dc0e374a0df0f29716df60250e2c4b4f7
2016-02-17 14:11:06 +00:00
drh b7997fe3a9 Enhance Lemon to generate more compact and efficient code for yy_reduce().
Update the main SQL grammar to take advantage of the new capabilities.

FossilOrigin-Name: 53fd040c98d9647ea135d43c493777bf8da4aebd
2016-02-17 13:24:12 +00:00
drh 43303de97e More agressive use of /*A-overwrites-X*/ in the parser. Fix an off-by-one
error in parser stack overflow detection.

FossilOrigin-Name: 417e777701bbf4bd67626d4ca3bc2c5d847f6cd0
2016-02-17 12:34:03 +00:00
drh 0ccbc64fd6 Documentation typo on sqlite3_wal_hook(). No changes to code.
FossilOrigin-Name: fc2043ebaa3f106529500164936bb82f9b921b1c
2016-02-17 11:13:20 +00:00
drh cf82f0d3d2 Enhance Lemon so that if reduce code contains a comment of the form
"/*A-overwrites-X*/" then a LHS label A is allowed to overwrite the
RHS label X.

FossilOrigin-Name: 5cfe9545d478a2c500083613dd20e14b2ffce645
2016-02-17 04:33:10 +00:00
drh dabd04c656 Further improvements to the Lemon-generated code for yy_reduce().
FossilOrigin-Name: ef95a7d6490e33a9af4bc7b4b622de7328742ca7
2016-02-17 01:46:19 +00:00
drh 4dd0d3f819 In Lemon, add the ability for the left-most RHS label to be the same as the
LHS label, causing the LHS values to be written directly into the stack.

FossilOrigin-Name: 4bb94c7c4c3cb3ccad72c2451d88684130dde845
2016-02-17 01:18:33 +00:00
drh 45f31be85d Experimental changes to Lemon for improved parser performance.
FossilOrigin-Name: a65d583ce97b8c08157268bd054479cda3957a94
2016-02-16 21:19:49 +00:00
drh 30c14728b4 Minor simplification to the tokenizer. Slightly smaller and faster.
FossilOrigin-Name: 9570b6b43df3bc5ce314cded20bca8be9e968efe
2016-02-16 13:04:19 +00:00
drh dab943cf3d Improve the Lemon parser template (lempar.c) so that it avoids unnecessary
work when the grammer defines YYNOERRORRECOVERY (as SQLite does).  Slightly
smaller and faster code results.

FossilOrigin-Name: 9235b0cf6a37712ae9e5deeb1e5ee064dd5511fa
2016-02-16 01:01:43 +00:00
drh 7ff89807e0 Fix a harmless compiler warning in FTS5.
FossilOrigin-Name: e52c90758c53cbb0f74e0d8582e4c3c1bee04150
2016-02-15 23:46:36 +00:00
mistachkin b71aef3461 Readability improvements for winRandomness.
FossilOrigin-Name: 1640f814c7a5210f08c81e52e5a3fb89ac26f4d4
2016-02-15 22:37:18 +00:00
mistachkin 0ead47d1c7 Fix comment. No changes to code.
FossilOrigin-Name: 2e1f2eff27e25280fe626c07b6260b0a7aa903d3
2016-02-15 22:28:50 +00:00
mistachkin bfc9b3f45c Revise compiler checks for the rand_s() function.
FossilOrigin-Name: 287f508dd6abc1b9ffdbec6a685ebe79eeac992b
2016-02-15 22:01:24 +00:00
drh 51d5ed97f5 On windows systems when rand_s() is available, use it to obtain additional
seed material in winRandomness().

FossilOrigin-Name: 139081bef9f63c3ebbe9e992408597b1349bdf37
2016-02-15 21:31:51 +00:00
drh 8eb3790a8d Improved entropy gathering for the implementation of winRandomness().
FossilOrigin-Name: fea3705e7750d276a8c8300b7a82dfae2d5979c0
2016-02-15 20:41:56 +00:00
drh 4b7b1c9c12 Add working -q and --help options to testfixture.
FossilOrigin-Name: 404494e52b6385671ccde1c83b7b868986645536
2016-02-15 19:38:17 +00:00
drh 3719d10d11 In the tool/warning.sh script, disable Android-specific compiler warning tests
when not running on Linux.

FossilOrigin-Name: 153f01a821e9844d0a2e418eb83c60f6c7695c8d
2016-02-15 18:58:37 +00:00
drh e683b89880 Fix harmless compiler warnings previously seen in 64-bit MSVC builds.
FossilOrigin-Name: 7026246300392a83cc23817dbc54c2c66bf1f2b3
2016-02-15 18:47:26 +00:00
drh 32c49904a6 Add the SQLITE_NOMEM_BKPT macro to enhance the ability to debug OOM errors.
Only effective with compiling with SQLITE_DEBUG.

FossilOrigin-Name: 9b3454762d142113f5923d754ca6bd2edefbd362
2016-02-15 18:15:15 +00:00
drh 66acf297fd Minor code simplifications.
FossilOrigin-Name: c3b38efd50c3c07b6dee5dea4c1f95b37d1c0994
2016-02-15 18:02:13 +00:00
drh 3bff397248 Make the application-defined SQL function logic more compact and faster,
especially faster for the case where an application defines thousands of
new SQL functions.

FossilOrigin-Name: 7d49ed32a7262ec95d72ce520ab75402633386a1
2016-02-15 17:56:35 +00:00
drh 7f219fad58 Merge 3.11.0 changes.
FossilOrigin-Name: 631023dd9aa19cd8d92d712941d58e7148821995
2016-02-15 17:39:10 +00:00
drh 195c8d5eba Version 3.11.0
FossilOrigin-Name: 3d862f207e3adc00f78066799ac5a8c282430a5f
2016-02-15 17:29:24 +00:00
drh 8e0cea1a5d Make sure the codec is invoked when overwriting existing frames of the
WAL file.  Yikes!

FossilOrigin-Name: f694e60a79024967a3f4574e3928f0b28589d381
2016-02-15 15:06:47 +00:00
drh 80738d9c3e Improvements to the application-defined function mechanism so that it is
more compact and runs faster, especially when the application defines
thousands of new SQL functions.

FossilOrigin-Name: 3201fbcc5105d23132e6b8b7ac825e66af4f8a39
2016-02-15 00:34:16 +00:00
mistachkin 8fd8413aaa Update a comment.
FossilOrigin-Name: e9753d9a2c1269050f886e6cb9bc9cba0a8df6ce
2016-02-14 00:14:35 +00:00
mistachkin fad3039c51 Enhance ability to debug out-of-memory errors.
FossilOrigin-Name: 6a9c4a3ebfb7cc0738ef6634440ccab44a21ff28
2016-02-13 23:43:46 +00:00
drh e75a9eb9bb Provide Sqlite3_SafeInit() and Sqlite3_SafeUnload() entry points on the TCL
interface, but have the always return TCL_ERROR, because the non-standard 
TCL builds on Macs require this.

FossilOrigin-Name: 37ec3015ec95035d31e3672f520908a0d36c9d67
2016-02-13 18:54:10 +00:00
dan a66e386225 Fix another test problem in sessionfault.test.
FossilOrigin-Name: f6d1cf79437f892220e93635c377513160ee7fd7
2016-02-13 15:08:25 +00:00
drh 50d348b1e1 Harden sqlite3session_delete() against trying to delete a session that
is not currently on the session list.

FossilOrigin-Name: 6c2d34df76fb7823f307c11a1135ab30674421a9
2016-02-13 14:45:56 +00:00
dan 6fee795885 Fix a problem in sessionfault.test causing it to segfault following a test failure. This commit does not fix the actual test failure - just the subsequent segfault.
FossilOrigin-Name: 582b2ae77d65b1e142ceb5774f37b0aaa3851378
2016-02-13 14:39:46 +00:00
drh d8b7d6e44c Merge the changes for the 3.11.0 release candidate from trunk.
FossilOrigin-Name: 4d7a802e73ef0352f840bc8d74c560afb7666ff7
2016-02-13 14:07:56 +00:00
dan 53ff9c2972 Fix a potential buffer overread provoked by invalid utf-8 in fts5.
FossilOrigin-Name: a049fbbde5da2e43d41aa8c2b41f9eb21507ac76
2016-02-12 18:48:09 +00:00
dan f2d328fa25 Fix a fairly obscure buffer overread in fts5.
FossilOrigin-Name: 130580207ab5cee762b2893808acef7c8afad027
2016-02-12 17:56:27 +00:00
drh aa622c1f4f Fix a documentation typo. No changes to code.
FossilOrigin-Name: d9c985878cf7c74a79ccdb9cf94a2d48fdde3e6f
2016-02-12 17:30:39 +00:00
drh cd42352526 Enhance mptester so that it takes great care to delete its test database
prior to start-up, including checking the return code from unlink() and
retrying after a delay if unlink() fails.  Hopefully this will clear 
intermittant startup problems on Windows.

FossilOrigin-Name: 6ea84ec1e02f0a48953bc758027ab7148529c36e
2016-02-12 17:27:32 +00:00
mistachkin a819aed880 Naming updates for Universal Windows Platform.
FossilOrigin-Name: 717c1fc41a2246e27b324a4071073c286bac4efc
2016-02-12 05:19:29 +00:00
drh f981093760 Remove an unused parameter from whereSortingCost().
FossilOrigin-Name: b5d771991686bf86a679b7dff9f16301a5029c8b
2016-02-12 00:13:38 +00:00
drh 4553f6ea91 Automatically disable FTS3 and FTS4 when building with SQLITE_OMIT_VIRTUALTABLE.
FossilOrigin-Name: 0beb32d20d8dd698138cdb2de6b6056de176754d
2016-02-11 22:41:04 +00:00
mistachkin 30470c5162 Enhance the MSVC makefile to enable building 'testfixture' fully from source code.
FossilOrigin-Name: f183e05990608d1a4002fa8a02c2d2eea6bc94b6
2016-02-11 21:59:02 +00:00
drh c50d5908b4 Remove the unexplained extra 3.0 cost factor for the B-tree sorting that is
done to implement DISTINCT in the absence of an index to help.

FossilOrigin-Name: 52571991fcfa2629e8a8354e0c9a62e749a092bf
2016-02-11 21:55:23 +00:00
drh 5d2e2f1267 Remove the unused fts5BlobCompare() routine.
FossilOrigin-Name: defc762dd11144402abd591278819768a080d5ea
2016-02-11 21:53:57 +00:00
mistachkin e2eb259fce Prevent 'expanded command line X too long' errors during the batch 'for' loops used for copying files.
FossilOrigin-Name: 67ee9b5af10a8b57a37f19ac040e49fdfcec4145
2016-02-11 21:38:05 +00:00
mistachkin c04c54b842 Enhance the MSVC makefile to enable building 'testfixture' fully from source code.
FossilOrigin-Name: 54ff3a26bc45a1c3c0690119e8fd00b02e2a16ba
2016-02-11 21:28:16 +00:00
dan df9c59f74d Fix another unused variable warning in fts5 code.
FossilOrigin-Name: 61b4c120540afd80a4021b0d3990f13acc38a059
2016-02-11 18:18:33 +00:00
dan 2a44b3d877 Avoid a buffer overread when reading a corrupt fts5 structure record.
FossilOrigin-Name: facbc424e555061135aced7b134bf6c19f54e484
2016-02-11 18:08:38 +00:00
dan 22e8356368 Handle parser stack overflow when parsing fts5 query expressions. Fix some compiler warnings in fts5 code.
FossilOrigin-Name: bc3f7900d5a06829d123814a5ac7b951bcfc1560
2016-02-11 17:01:32 +00:00
drh df3a907ecc Add JSON1 and FTS5 to the set of extensions subject to close compiler warning
analysis.  Fix some warnings in each.   More (harmless) warnings still exist
in FTS5.

FossilOrigin-Name: cfe2eb88b504f5e9b1351022036641b1ac4c3e78
2016-02-11 15:37:18 +00:00
drh c41c132cf0 Minor simplifications deferred to the next release.
FossilOrigin-Name: a863729ccb75a56330460d3b7d558e639ad733d1
2016-02-11 13:30:36 +00:00
mistachkin 8988aeef60 In the MSVC makefile, include the working directory so that it can pickup build generated files (e.g. sqlite3.h, etc).
FossilOrigin-Name: e9e6000bd2f7e0ef85178db2b5b8f20e4cf0093c
2016-02-10 21:45:25 +00:00
drh 05723a9e3c Add testcase() macros to the CHECK constraint avoidance logic. Avoid creating
an unused VDBE label during CHECK constraint code generation.

FossilOrigin-Name: 970881befd5da6cc837c474d6e917de0bf029350
2016-02-10 19:10:50 +00:00
drh 98bfa16db2 Fix to previous check-in: Make sure CHECK constraints involving the ROWID
are not ignored when the ROWID changes.

FossilOrigin-Name: 7782cb1dd5914b867caf5ff2f0f837407abbfd7a
2016-02-10 18:24:05 +00:00
drh 2a0b527b37 Omit unnecessary CHECK constraints in UPDATE statements, when none of the
columns referenced in the CHECK constraint are modified.

FossilOrigin-Name: 02fbdbc782dd98f080bf4482d820f36c0ef3d519
2016-02-10 16:52:24 +00:00
drh bdb00225ab Omit NOT NULL checks on unchanging columns in an UPDATE.
FossilOrigin-Name: 6a3aaedfb41735996470abbae6d3cd1be1f508b3
2016-02-10 16:03:20 +00:00
drh dd2b59b01d When generating the snapshot-tarball, truncate the date/time in the name to
12 significant digits (YYYYMMDDhhmm) omitting the seconds and fractional
seconds.

FossilOrigin-Name: 604f77754797a4066f6cf275c7bc8a68d2839c2d
2016-02-10 13:36:17 +00:00
drh 0d4f9354db Updates to the autoconf tarball README.txt file.
FossilOrigin-Name: a3e911e3aa3e35446bed7f300bfe03f66e1494db
2016-02-10 13:17:14 +00:00
drh 8809d821b4 Update the snapshot tarball name to use the date (ISO8601 format) instead
of the SHA1 hash in its name.

FossilOrigin-Name: 070ec66f677cdcd30087871feb8afd010a184b75
2016-02-09 22:54:39 +00:00
drh 07f76568da Add the new "snapshot-tarball" target to the unix makefiles, for building
a tarball similar to "amalgamation-tarball" but named by the SHA1 hash of
the current check-out rather than by the version number.

FossilOrigin-Name: 4f360b2ae78b3d4ccfe6c40ac6b27a00fc70cf23
2016-02-09 22:39:39 +00:00
mistachkin c5286de0ee Update the MSVC autoconf makefile with the recent changes from the primary one.
FossilOrigin-Name: c7242aa3e9c08e0c019388e89a785a6e59c915d5
2016-02-09 22:00:48 +00:00
drh 949c5d3cfc Fix the makefiles in the autoconf-tarball so that they build the command-line
shell with SQLITE_ENABLE_EXPLAIN_COMMENTS.

FossilOrigin-Name: 1135ad014aac8a4ae5169375af1b368feaa8331b
2016-02-09 20:37:46 +00:00
mistachkin 6d94555914 In the shell, use the appropriate string constant instead of a literal new-line.
FossilOrigin-Name: 61951b153d47096f30ebc8b84af408d9d709637c
2016-02-09 20:31:50 +00:00
drh d4e2857815 Enhance the command-line shell to be in auto-explain mode by default. It is
no longer necessary to use the ".explain" command to put the shell into a mode
where the EXPLAIN output is formatted nicely.  That now happens automatically.

FossilOrigin-Name: 751915cb7e4981661a40dc5e4d029ab27434c2d9
2016-02-09 20:11:14 +00:00
drh 87a24aa1ca Improved auto-detection of EXPLAIN output in the shell.
FossilOrigin-Name: 6c6d7a6e89e67cdb0813d3eebb869aafb43d43ed
2016-02-09 20:04:07 +00:00
drh 700c252a72 Add auto-explain mode to the command-line shell. Default on. Auto-explain
tries to automatically detect EXPLAIN queries and format them appropriately.

FossilOrigin-Name: 1d62aa6b315df47cafb33da7ca79d3386a2fdd48
2016-02-09 18:39:25 +00:00
mistachkin 406eeff6ff Fix MSVC makefile options that enable control-flow guard.
FossilOrigin-Name: 51b6823f4c9376d549f572f5a33cac1e4c9783a2
2016-02-09 18:28:20 +00:00
drh 74cf74ab7f Fix the top-level makefiles to always include SQLITE_ENABLE_EXPLAIN_COMMENTS
when building the shell.  Still need to fix main.mk and the
amalgamation tarball.

FossilOrigin-Name: 992282399cd2d1fc52ff5a1a4bff59f30b62899a
2016-02-09 17:12:22 +00:00
drh bbde018230 Code simplification: ALTER TABLE ADD COLUMN always upgrades the file_format
to 4 if is not there already.  No need to upgrade to only 2 or 3 since format
4 has now been supported for over 10 years.

FossilOrigin-Name: e1d8ec85546caeca3bb7a05ad962a2aed91194ce
2016-02-09 16:09:22 +00:00
drh 1a606f8246 Merge enhancements and fixes from trunk.
FossilOrigin-Name: f040a5bb62f3473fba6450c97c68f538d1df21ef
2016-02-09 15:44:18 +00:00
drh 2fade2f791 Make sure every co-routines has its own set of temporary registers and does
not share temporaries, since a co-routine might expect the content of a
temporary register to be preserved across an OP_Yield.
Proposed fix for ticket [d06a25c84454a].

FossilOrigin-Name: ca72be8618e5d466d6f35819ca8bbd2b84269959
2016-02-09 02:12:20 +00:00
mistachkin e48f1ed9bf Fix spelling error in MSVC makefile comments.
FossilOrigin-Name: 6eab74c9ae57676044b5bc82fa14e92fd2448008
2016-02-08 20:45:37 +00:00
mistachkin 55e88d96ed More work on Windows 10 SDK integration.
FossilOrigin-Name: 1e563c6ebbb02d2e89760c7a7f95aa69964629c6
2016-02-08 20:40:57 +00:00
dan c2d0b56e6a Fix a signed/unsigned comparison warning in fts5.
FossilOrigin-Name: 85eb05ddbc3a7cff986af13c3dab6c0063e62171
2016-02-08 20:14:41 +00:00
drh 83d7920e55 Fix a compiler warning when compiling without SQLITE_ENABLE_FTS3_TOKENIZER.
FossilOrigin-Name: 6926f28cd56bf61f7c92877baa54024bee7cbab5
2016-02-08 20:06:52 +00:00
dan e064c4066c Disable the two-argument form of the fts3_tokenizer() SQL function unless the library is built with -DSQLITE_ENABLE_FTS3_TOKENIZER.
FossilOrigin-Name: e0eb217aca7e4aadf9c44ed20822b78139f7c83c
2016-02-08 19:40:17 +00:00
drh e96f361995 Changes to help the tokenizer run about 33% faster.
FossilOrigin-Name: a050e6f096d40aa5b6275797b96e62c228044f5a
2016-02-08 19:36:46 +00:00
drh 34dcee6544 Add code to get the tokenizer character-class logic working for EBCDIC.
FossilOrigin-Name: 04f7da77c13925c1f1e287f4579bb85518297d81
2016-02-08 19:15:48 +00:00
drh 41aab89b31 Faster keywordCode() implementation by taking advantage of the fact that
the input is always pure ASCII alphabetic and underscore and that the keyword
table is always upper-case.

FossilOrigin-Name: ff406b9701ebe3a01834837f380641c6f0c495bc
2016-02-08 03:23:46 +00:00
drh 8974331fc3 Demonstrate a much faster sqlite3GetToken() routine by using a lookup table
to map initial token characters into a character class.  This check-in does
not work for EBCDIC.  More optimization needed.

FossilOrigin-Name: 9115baa1919584dc8ca25bbff54d3b65748a9631
2016-02-08 02:30:50 +00:00