17960 Commits

Author SHA1 Message Date
dan
416b8694fa Simplify the way in which the database file is truncated when the last
connection disconnects. Also ignore the error code from the xTruncate call -
as truncating a database file is always optional.

FossilOrigin-Name: b0a49d90fc91acca1306cf6145adc83acd368686768b7eb4a3b27515b3237396
2017-07-11 19:55:38 +00:00
drh
8999798e60 Fix harmless compiler warnings in the core.
FossilOrigin-Name: 55e93f256018757e5e1cb3b10ef48abf5914e7687419eae58b00998a37061261
2017-07-11 18:11:33 +00:00
mistachkin
ba334bb20d Make win32GetTimeOfDay() in the lsm1 test code more portable.
FossilOrigin-Name: 2fe3a84330063378ca9fc5bfc8efe486c52d50b5c40be4f402a4f2318be69436
2017-07-11 17:54:27 +00:00
drh
db3e0456d2 Enabled the new sqlite3_prepare_v3() and sqlite3_prepare16_v3() interfaces
for loadable extensions.

FossilOrigin-Name: b9debd626a68c4bc0e5fdeb8d15a991cfe6f62f9586eda76c07a1c18e498e3c2
2017-07-11 17:28:27 +00:00
mistachkin
b7bfc3b12d Fix a whitespace alignment issue in lsm1.
FossilOrigin-Name: a8e651e0e52b016c3939df3ee23b4981f1a8841c7ddd2981c1ef391feb559a5e
2017-07-11 17:06:42 +00:00
mistachkin
36c68234d6 Fix more harmless compiler warnings in lsm1, seen with MSVC 2015.
FossilOrigin-Name: 0f1307f1f5638c1c4f1ce2b89cdef7ce8b76dc2a38685cd1ca152cde9e8727da
2017-07-11 16:46:41 +00:00
mistachkin
1be5051923 Fix harmless compiler warnings seen with MSVC for lsm1.
FossilOrigin-Name: cf6da4a52f7f9047e653ef2972e4c0910b29d7182d789a9e30225dc1849e8779
2017-07-11 16:36:10 +00:00
drh
56eb09bc23 Add support for tab-completion (using the ext/misc/completion.c virtual table)
to the command-line shell.

FossilOrigin-Name: 95cd1d9f8baa6be305c9a8bfa26fef2a403f2d5b3b5c9c55382ec04f0bc98d40
2017-07-11 13:59:07 +00:00
drh
2ce15c3f4c Change the src/shell.c file so that it is generated from a new script at
tool/mkshellc.tcl and the template file src/shell.c.in, and automatically
includes the extensions it needs out of ext/misc.

FossilOrigin-Name: 17e0bb12d82b510b86b6886b9fd0faf39b60b1374027344f89d7b89a32b842b9
2017-07-11 13:34:40 +00:00
drh
e2b01012bc Fix a backup2 test case so that it works on FreeBSD.
FossilOrigin-Name: 724819b456ca7a5ca6d68415b3b3554741c3ddbb5c416cb6b6b5fc54177f426e
2017-07-11 02:53:38 +00:00
drh
f3c0009d8b Add the "phase" output column on the COMPLETION table-valued function, for
debugging.  Improved comments on the implementation.

FossilOrigin-Name: 0e2135552757cc6566ac959475d3b87254b6d462425ee6c457c743001f3370e2
2017-07-11 02:05:21 +00:00
drh
dc4dde6bd9 The COMPLETION virtual table now looks at the names of databases, tables,
and columns in addition to SQL keywords.

FossilOrigin-Name: 1cc97711fa86a3938f0930200476d1b0991e4b893a8be3a19015423a3de56bef
2017-07-11 01:38:45 +00:00
drh
3265b5649e Incomplete implementation of the COMPLETION table-valued function. So far it
only works for SQL keywords.

FossilOrigin-Name: caefbc723b5f67afc5ef10b92b20400cbb76cb03e7e75e18d2726cc552083e09
2017-07-11 00:09:44 +00:00
mistachkin
b2950c48e1 Fix harmless compiler warnings in lsmtest.
FossilOrigin-Name: bd8a1fb9b33418717c786a7275f636cd4d5facd66de9a416f948b61c6490c743
2017-07-10 21:32:11 +00:00
drh
4a9e14077e Fix errors in comments in the STMT virtual table. No code changes.
FossilOrigin-Name: 9a8f045d62f5c6593a5a2842e817b49fa9d00c74e329a15a326f74e583c1f767
2017-07-10 20:39:59 +00:00
mistachkin
240e7ef4bb Minor cleanup and refactoring of the Win32 VFS for lsm1.
FossilOrigin-Name: bf7eda67c8124c3cd5d9150f2f2694cd3f991b20e0a527398885976d0d787242
2017-07-10 20:33:50 +00:00
drh
a868639656 Another spelling error in the README.md file.
FossilOrigin-Name: 0512937425df6f274153f1d822fc4fe358601c2944745c0039c40e645ebedd82
2017-07-10 19:54:48 +00:00
drh
e1869a91d6 Spelling error in README.md
FossilOrigin-Name: 12bc47c50252f1307b224d171069b93192d0c905aadf480829bba390c059aee4
2017-07-10 19:08:59 +00:00
drh
764fb30330 Yet another typo in README.md
FossilOrigin-Name: 75c9327b551d072effbb37efebf5fbe1a45965f89fe285df364dda06ca866cd7
2017-07-10 19:07:11 +00:00
drh
67d5bf9118 Fix another README.md typo.
FossilOrigin-Name: 20b1f0eff175aa8be9a7a631ede0a434f6c340fcdb931633e1f228d1fb35abde
2017-07-10 19:05:58 +00:00
drh
14d5ff4202 Fix an obsolete statement about Lemon in the README.md file.
FossilOrigin-Name: 4f6ce7a38baef24e00818926b9b8dc852334e3d4011f1d3a577c8c7e5f7ed93e
2017-07-10 19:03:04 +00:00
mistachkin
91ea8cf4ac Cleanup header usage in lsmtest for files that require _O_BINARY.
FossilOrigin-Name: f3a6a64ec90e6cf24aadf62aef4f92104be5ba6790f7fca040eff7abc31f1061
2017-07-10 18:57:03 +00:00
drh
7ff64dc2bc Updates to the repository README.md file.
FossilOrigin-Name: 7bfd3ab7996bf869eb2705495f3f2cd8bd6d1f4d029a1f26041e95049a9bfd3b
2017-07-10 18:52:29 +00:00
dan
ff7733db52 In LSM, avoid calling the VFS xTestLock method to test for a lock that
conflicts with one held by the same process. The results of such a call are
considered undefined (since they are different under win32 and posix).

FossilOrigin-Name: a82a9bea624caf6b24d8e3f3c596817968b258f06e54288022f6df8226281057
2017-07-10 18:33:41 +00:00
drh
dbc26722cd Add the "--newlines" option to the ".dump" command in the shell to disable
the newline escaping mechanism.

FossilOrigin-Name: bde431b1e332feaeb516dc46d180e2b2f42820c471feed7eda89452ada898dc9
2017-07-10 18:04:41 +00:00
drh
90e39ec349 When multiple constraints need to be evaluated for a row, do any constraints
that involve correlated subqueries last.  Hence, the priority is index-covered
constraints first, correlated subquery constraints last, and all others in
the middle.  This is a
follow-on and improvement to the push-down optimization of check-in [d7bb79ed].

FossilOrigin-Name: c4cb90487f34937605732c3959891075e2aabfb0bd05e55c44565d65867093ea
2017-07-10 17:00:31 +00:00
drh
66a0bf31cc Additional debugging Noop-comment in the constraint generator when
wheretrace is enabled.

FossilOrigin-Name: 0ca7474f05e9f27f53f8c71f5a3ff99963ffef9be9c147869e096246d552d6f1
2017-07-10 16:38:14 +00:00
drh
e24b92bce7 Small performance optimization in sqlite3WhereExprUsage().
FossilOrigin-Name: 38edc6770e54e456500e77389d42fdf39e9a7ed258a4e1fed3c6dd8fdf4dfcb7
2017-07-10 15:26:09 +00:00
dan
d3930b1266 Fix another problem on this branch.
FossilOrigin-Name: a4fc98113aeb10860834f68a2fdcef690ea15d8303d23b6dd416994a4b7edab6
2017-07-10 15:17:30 +00:00
dan
8674ec5a7f Fix a problem causing non-covered WHERE terms to be evaluated before covered
WHERE terms.

FossilOrigin-Name: 7d3cb39f60951dcec1ff87da2c4ec998f993de5edf49ee5e5f480c6fe4e5a052
2017-07-10 14:39:42 +00:00
dan
ebc63013b7 When testing non-indexed WHERE constraints, test those that involve
correlated sub-queries last of all. This increases the chances of not having
to run the sub-query at all.

FossilOrigin-Name: 1f9c1f359e4693954ba7e2bc7b172ef34eb046e4ca2796df8336975b9d6aa92b
2017-07-10 14:33:00 +00:00
drh
9f6e14c1ef For sqlite3TreeView() debugging output, show the Expr.flags field on
scalar subqueries.

FossilOrigin-Name: dc857a96b00f13ffdf77bc222bc5acbbe14a36ca51e5368b568b3177d1be737a
2017-07-10 13:24:58 +00:00
drh
ff4fa772f5 Update error message text for standard error codes to better describe the
latest usage of those error codes.  Modify sqlite3_open_v2() so that it does
return a valid sqlite3 object in the event of SQLITE_MISUSE due to bad
open flags, so that sqlite3_errmsg() does not report "out of memory" in that
case.

FossilOrigin-Name: f27b6370407842e2c175ea4aa9ce018723c57eaac0cccc1f8399bc20f33324be
2017-07-10 12:07:53 +00:00
drh
e75be1aedb Remove the error message text from disused error codes such as
SQLITE_EMPTY and SQLITE_FORMAT.

FossilOrigin-Name: 871752f2925ee14bdd3e994c00832d00860c03f6f28e63504aa6d35978b7f37c
2017-07-10 11:17:51 +00:00
drh
155507b344 Always make "column%d" column-names 1-based, never 0-based.
FossilOrigin-Name: 70096c505d702a9646da24613da387cee19afcf395d0294b3797c5ab50bb3ee2
2017-07-09 18:55:29 +00:00
drh
d7ca600ede Make sure the columns of a VALUES() clause are named "column%d" even if
the VALUES() clause is a subquery in the FROM clause of an outer query.

FossilOrigin-Name: acf3b9cc9c3932431979995a1dceacc06c659ab400fad95ce3728ff8895a022b
2017-07-09 00:30:58 +00:00
drh
2aa31333c2 Add the --icc, --gcc7, and --orm options to the speed-check.sh test script.
FossilOrigin-Name: 70dae08a9a6e35416f7268b9a95f3c8562b74697918bd1e9d5b5cf4719b9d075
2017-07-08 22:30:30 +00:00
drh
12ca0fc259 Basic test cases for PRAGMA secure_delete=FAST.
FossilOrigin-Name: 0c246017b45c5290f3a7932dfce649f1a6d8f9afc00c6c3edf2ef06c17dbca1d
2017-07-07 22:47:32 +00:00
mistachkin
50963c9da8 Fix comment in the Win32 VFS for lsm1.
FossilOrigin-Name: 12a421bcacf72128426eeafed8663accd8f2ac7edb46f620b60b8239065e657e
2017-07-07 21:20:26 +00:00
mistachkin
85bd1cd52b For lsmtest, use a more portable means of setting open() files to binary.
FossilOrigin-Name: aea6e0ffd33f41482f1b53b9f21b77add2865abda4eec1d9ee197177f74f43d0
2017-07-07 21:15:24 +00:00
mistachkin
1d91e9f26a Adjust copy_file() lsmtest function so it works properly for locked database files on Win32.
FossilOrigin-Name: 54a3855583deac93c955ed77fe82be6a6b7aadd3fdb7e6b895888e2a4ff530bd
2017-07-07 20:35:14 +00:00
drh
08f1efeb16 Add the "PRAGMA secure_delete=FAST" option, which overwrites most deleted
content without increasing the amount of I/O.  Deleted content might persist
on the free page list, however.  And extra CPU cycles are used for zeroing,
of course.

FossilOrigin-Name: 38978ce65b280bb7cba3fc08ba91485fb1b84cd9fbba2e950ecf41c021ff452a
2017-07-07 20:06:28 +00:00
drh
a690ff360b Change the error message text for SQLITE_ERROR to omit the part about
"missing database" as that meaning is now obsolete (since approx SQLite 2.0).

FossilOrigin-Name: 732f90d6327c5c6368fc8b4cc207bd644ef08e3ae6d2e7295258ab099deaba63
2017-07-07 19:43:23 +00:00
mistachkin
b11c650c01 Fix typos in Win32 VFS for lsm1.
FossilOrigin-Name: 0961ec873b78ad2da0ea9cdf2934bc8f08276375a153fe5d9fa8d4280328deef
2017-07-07 19:22:35 +00:00
mistachkin
73518c5876 Fix the memcpy calls in the lsmWin32OsShmMap function for lsm1.
FossilOrigin-Name: aa4890b9f9e9698c61d6ca0e24c26280f5e0a87a8c02865933ad483a1fd44d84
2017-07-07 19:12:55 +00:00
mistachkin
a2d85cbbfa Enhance the MSVC makefile 'clean' target to handle lsm1.
FossilOrigin-Name: 2d6faebc319aefeab796c5f2ead4c3c3e2a9dd25c979a16bdb555a109135b13c
2017-07-07 19:02:51 +00:00
mistachkin
9a7a77ad36 Add support for LSM_DEBUG to the MSVC makefile for lsm1.
FossilOrigin-Name: 277a7fedafbe5b43d44086f3cb73e952873913bdc4b51041f45b6571b386d7d9
2017-07-07 18:31:51 +00:00
drh
a7a0bfab91 In the command-line shell, when running ".schema" give a sensible error when
the database file is locked.

FossilOrigin-Name: cc329eb8d65171f3f4fcb39b0e55ef85c97a77f3510cf864bbc1537f993d0074
2017-07-07 18:06:49 +00:00
mistachkin
9b8c5f6819 Fix the usleep() macro in the Win32 test code for lsm1.
FossilOrigin-Name: 63599fa524a7c72ffa5362041f2ec394d9af9c43025d8b6d5a34e98eb423d5ff
2017-07-07 17:57:21 +00:00
drh
d5eae667f4 Add new PRAGMAs: "function_list", "module_list", and "pragma_list". All are
enclosed within #ifdef SQLITE_INTROSPECTION_PRAGMAS.  The compile-time option
is not on ctime.c yet, since these are still experimental and one can always
test "PRAGMA pragma_list" and see whether or not it returns an empty set.

FossilOrigin-Name: e0b6ae92adfae46f64fc2e2719e22e5467c34d49c1aeaec5cc5faf04258de0f7
2017-07-07 17:43:30 +00:00