]>
git.ipfire.org Git - thirdparty/sqlite.git/log
dan [Thu, 12 Oct 2017 15:28:51 +0000 (15:28 +0000)]
Add the experimental "sqlite_expert" extension. Used to find index definitions
that might help with specified SQL queries.
FossilOrigin-Name:
d1ef9eaba0b1bf61e57955f7054f8ecbfbfebaf6f3ddb54861a24cae08684b57
dan [Thu, 12 Oct 2017 14:13:31 +0000 (14:13 +0000)]
drh [Thu, 12 Oct 2017 13:47:48 +0000 (13:47 +0000)]
The src/shell.c file is now generated from src/shell.c.in, so remove shell.c
from version control and update the makefiles to build it automatically.
FossilOrigin-Name:
36acc0a97fdcc6f54f29c68c4e131702f69c3e59e58237ff4e5c647928699956
drh [Thu, 12 Oct 2017 13:21:56 +0000 (13:21 +0000)]
dan [Thu, 12 Oct 2017 11:33:13 +0000 (11:33 +0000)]
Fix a potential crash that may follow an OOM or other system error in the shell tool.
FossilOrigin-Name:
c36761e1a05c15c48468dd793faf06636f5dcfd3b4314074c4d9c9eac5c2695c
dan [Thu, 12 Oct 2017 11:13:34 +0000 (11:13 +0000)]
Update some test cases to work with SQLITE_OMIT_VIRTUALTABLE and
DEFAULT_AUTOVACUUM builds.
FossilOrigin-Name:
4b68f424ca9b5d4b0e77065a4e60ec0f70dcce0d01053fd7a6b2ecae9d3a5967
drh [Thu, 12 Oct 2017 10:28:30 +0000 (10:28 +0000)]
Make sure the tableColumnList() routine of the command-line shell does not
cause a null-pointer dereference in an error condition.
FossilOrigin-Name:
5d0ceb8dcdef92cd72307e532a4a6c269b2c458fecb0bbede0bb941099eebc5b
drh [Thu, 12 Oct 2017 01:19:06 +0000 (01:19 +0000)]
Fix a typo in a numeric constant in an assert() - a bug that has been present
in the code since check-in [
79e22b95038 ] on 2010-03-30.
FossilOrigin-Name:
f0a2724f0a255cd5a262f31e4ee1f99ae713c25a9ecc56dc794c95f223453b9b
dan [Wed, 11 Oct 2017 20:27:03 +0000 (20:27 +0000)]
Add test file mmapwarm.test. With tests for the sqlite3_mmap_warm() extension.
FossilOrigin-Name:
5c4980ef17291dcea5e93ead353b9a95e2fbff56ff7257e9878d095f6827b4e9
dan [Wed, 11 Oct 2017 20:26:07 +0000 (20:26 +0000)]
Merge latest trunk changes with this branch.
FossilOrigin-Name:
2719cf5c5bbe8e31d18368d54d968af3878ad2e15f0666e18d7b567d7439c451
dan [Wed, 11 Oct 2017 20:10:22 +0000 (20:10 +0000)]
Change some internal details to bring this branch closer to the code on trunk.
FossilOrigin-Name:
58e42cfd7d4af2279dab8dd895dca7afbdf9035445bc81bd4a7461ea24e846fc
mistachkin [Wed, 11 Oct 2017 17:50:22 +0000 (17:50 +0000)]
Make JSON1 defines consistent in the makefiles for MSVC.
FossilOrigin-Name:
31eee0e4bffc5419e076a589049bfea7327dfc666fcc2767c0b700f506055c4e
drh [Wed, 11 Oct 2017 17:25:08 +0000 (17:25 +0000)]
Enable JSON by default in the Windows command-line shell sqlite3.exe.
FossilOrigin-Name:
79c96121baf065fd78ba4f1fe82ce725b6372df20e9323d88022b7c243701372
drh [Wed, 11 Oct 2017 12:20:36 +0000 (12:20 +0000)]
In the speed-check.sh test script, allow an additional test-name argument
which becomes the comparison baseline, in place of "trunk".
FossilOrigin-Name:
0245adffc6f9b580217e0d2feb396d6895e54cdc25f5dfc9c8f4090b919e9e49
drh [Wed, 11 Oct 2017 11:12:20 +0000 (11:12 +0000)]
Create a branch for the 3.21.0 release. Development continues on trunk.
FossilOrigin-Name:
0f160a8abb0409b6e687ebc13b732559b3d65428f72430df142fd925eb39e9a2
drh [Tue, 10 Oct 2017 13:37:22 +0000 (13:37 +0000)]
DROP TABLE now works for WITHOUT ROWID tables and the SQLITE_OMIT_AUTOVACUUM
compile-time option. Fix for ticket [
e651b1341861d6 ]
FossilOrigin-Name:
b8c1b5a584aeb6ab63cff875ca16135efeadac16b4b32afa589845477feebf32
mistachkin [Sun, 8 Oct 2017 02:22:06 +0000 (02:22 +0000)]
Fix harmless compiler warnings in FTS5 seen with MSVC.
FossilOrigin-Name:
5594a121bf132a98d0ecb4cf86d9f2681925c9416206096bf11c9370a5dae22f
mistachkin [Sat, 7 Oct 2017 23:58:55 +0000 (23:58 +0000)]
Fix harmless compiler warning seen with MSVC.
FossilOrigin-Name:
39d920d1ef0cce40195b21e148f78f544710348fa180c0e76f743a73e5236d45
mistachkin [Sat, 7 Oct 2017 23:35:40 +0000 (23:35 +0000)]
Revise variable declaration moved in the previous check-in so sqlite3VdbeReset() is consistent with sqlite3VdbeRewind().
FossilOrigin-Name:
63d1b425ee6a7d2ae782b738d81d98e39342ae7fe7c4fd217a28a0bdafe4f222
mistachkin [Sat, 7 Oct 2017 23:31:33 +0000 (23:31 +0000)]
Fix C99-style variable declaration issue seen with older versions of MSVC.
FossilOrigin-Name:
14b181e862bd742555c51b87fab59d6f8f6602fe2c18dde3ef3b020779912419
dan [Fri, 6 Oct 2017 18:00:36 +0000 (18:00 +0000)]
Add tests for the example fts3 "rank" function that appears in the
documentation.
FossilOrigin-Name:
702b137aa4f76543647e177beeb1ca2b3cd18c61021c78880e9aa8656f341d65
drh [Thu, 5 Oct 2017 20:57:38 +0000 (20:57 +0000)]
Fix compiler warnings that come up with SQLITE_OMIT_WAL.
FossilOrigin-Name:
8ca0fa8dfe6a66aea7fc63f15e6f704cb190aa0760a3fec2db5f6bad3861a135
dan [Thu, 5 Oct 2017 20:02:49 +0000 (20:02 +0000)]
Fix a problem building with SQLITE_OMIT_WAL defined.
FossilOrigin-Name:
373b0ace480aa303bbf512ea8806a17f6186b16d6316a7b724499bf94b3974d4
drh [Thu, 5 Oct 2017 19:12:10 +0000 (19:12 +0000)]
Fix the command-line shell so that the ".schema --indent" command does a better
job of dealing with \r\n in the middle of a CREATE statement in the schema.
FossilOrigin-Name:
4258fb578a6e75590c7314fe511ca8dc6659e5f2d3a54d8f60ff705fe51ccc92
drh [Thu, 5 Oct 2017 11:29:37 +0000 (11:29 +0000)]
Disable the delta checksum verification in RBU by default. Reenable it using
-DRBU_ENABLE_DELTA_CKSUM, if desired.
FossilOrigin-Name:
d22c99b6ba997179ef3ccd341d9c36d5213d699305d15942d82587a0bfd16f9d
drh [Wed, 4 Oct 2017 18:26:44 +0000 (18:26 +0000)]
dan [Wed, 4 Oct 2017 17:05:04 +0000 (17:05 +0000)]
Update the speedtest1 program so that it prints the output of "PRAGMA
compile_options" if the -stats option is specified.
FossilOrigin-Name:
7c69f8f1089c3e3843fbf7ec37a897c849a3df822a4ce3b4fcde586adf991a3f
mistachkin [Wed, 4 Oct 2017 16:35:01 +0000 (16:35 +0000)]
Fix typos in session extension header comments. No changes to code.
FossilOrigin-Name:
182ec9d6f6c44938de0a2cd542e259d082deeeabc12a1815fff35e3ed1e524ef
drh [Wed, 4 Oct 2017 14:13:29 +0000 (14:13 +0000)]
New test cases for ticket [
b899b6042f97f5 ] derived from a bug report on
the mailing list from Wout Mertens.
FossilOrigin-Name:
ef94ea061d2ec8ee0243e97dfcfc7a7c75dd22006e61a7195b780722bbc925db
dan [Wed, 4 Oct 2017 12:08:35 +0000 (12:08 +0000)]
Amend recent changes to busy.test to avoid failing with SQLITE_ENABLE_STAT4
builds.
FossilOrigin-Name:
9ff4944194c56b38843bc626dc51604db8e1ca8a0fd221e2d6f78c840d57c341
drh [Wed, 4 Oct 2017 12:06:31 +0000 (12:06 +0000)]
Turn restriction 20 on the query flattener into an assert since the situation
restricted can no longer occur because of the more aggressive use of
co-routines.
FossilOrigin-Name:
4464f40ccd7c5553f4d44120ca6dac4e9445f08f083f7dcb3bd66b4413d818e0
dan [Wed, 4 Oct 2017 10:39:28 +0000 (10:39 +0000)]
Add tests to verify that the busy-handler is invoked correctly when processing "PRAGMA optimize" and ANALYZE commands.
FossilOrigin-Name:
fb83c3d8df250cb701fbe775b48ab93f5674496f68c57e04f50668c43c2de328
drh [Wed, 4 Oct 2017 05:59:54 +0000 (05:59 +0000)]
Remove a redundant restriction from the query flattener.
FossilOrigin-Name:
66629b2a0997ceedcfb38553f2200466b6c4e352ea00f8a0a7cb67a660c19523
drh [Wed, 4 Oct 2017 02:30:45 +0000 (02:30 +0000)]
Fix a minor typo in the query flattener header comment. No code changes.
FossilOrigin-Name:
d050dc605c24bcf60c0c47d13612ad53b871d3d4eff681c0c1b933acf53fb5ee
drh [Tue, 3 Oct 2017 19:53:12 +0000 (19:53 +0000)]
Simplify the computation of types on columns of a view.
FossilOrigin-Name:
772b0db1469c9e1c2728cf65dd070e29c624e75c3a5da72ee1297f15d758dd13
drh [Tue, 3 Oct 2017 18:35:57 +0000 (18:35 +0000)]
Do not enable SELECT tracing with -DSQLITE_DEBUG. Require the
-DSQLITE_ENABLE_SELECTTRACE compile-time option to enable SELECT tracing.
FossilOrigin-Name:
f5c395834c2a776beba6fe172cc4a5e428ce30b9cb4259ef8e440f10455a41e9
drh [Tue, 3 Oct 2017 17:29:40 +0000 (17:29 +0000)]
Add some OK_IF_ALWAYS_TRUE() marks on optimization branches in select.c.
FossilOrigin-Name:
1dd828088d6981dfebf9f4d650dad8431bece4405650c61f90eb8d8f43289b52
drh [Tue, 3 Oct 2017 17:17:34 +0000 (17:17 +0000)]
Remove an unused variable from sqlite3Insert() and fix harmless
compiler warnings associated with -DSQLITE_MUTATION_TEST.
FossilOrigin-Name:
7be760e907274131bcd4acfaff9e72c9c59a05e7d411db3d9afe690fe0d64b4b
drh [Tue, 3 Oct 2017 16:57:33 +0000 (16:57 +0000)]
Fix the sqlite3_column_decltype() interface to return the correct datatype
when the value comes through a CTE.
FossilOrigin-Name:
966438bd259ade3a2d4a6ec9587ce79c81a21b942248bffb389995b9132b53e3
drh [Tue, 3 Oct 2017 14:24:24 +0000 (14:24 +0000)]
The simplification to sqlite3SelectExpand() in last night's
[
3a4ffb21 ] check-in was not completely correct. This adjustment is needed
for correct OOM handling in some configurations.
FossilOrigin-Name:
c5ad5e1675f6cb5a54df21606dfec2198a7cf88acc529460ebe27bdab128a6e5
drh [Tue, 3 Oct 2017 03:01:09 +0000 (03:01 +0000)]
Do not compute column and row size estimates for the transient Table objects
associated with the result set of a SELECT statement, since those estimates
are never used for anything constructive.
FossilOrigin-Name:
e4342fd401d4025eecc53ebfcd59f3150166a5f0bd6adb1b5820703bd4a1ec58
drh [Mon, 2 Oct 2017 23:50:08 +0000 (23:50 +0000)]
Mark a single branch within sqlite3SelectExpand() as an optimization.
FossilOrigin-Name:
3a4ffb21d0ee2326c31b9ddc512d79d4ebf3a249a2840e88e99165978eec31fd
drh [Mon, 2 Oct 2017 23:30:45 +0000 (23:30 +0000)]
Simplification to sqlite3SelectPrep() for improved testability.
FossilOrigin-Name:
5bf2ccb908dc6ebf7e063014b0a4bed7e3e9e0a555f78c6b4f6647adfb7209e4
drh [Mon, 2 Oct 2017 21:29:51 +0000 (21:29 +0000)]
Add the OK_IF_ALWAYS_TRUE() and OK_IF_ALWAYS_FALSE() macros for marking
conditionals that improve performance but do not change the outcome.
FossilOrigin-Name:
6035c9b2728f47d338696978eb6fe5a7d6cb84bbea0792ef985c0986ac8f39dd
drh [Mon, 2 Oct 2017 13:20:43 +0000 (13:20 +0000)]
Avoid using lookaside memory for persistent virtual table structures.
FossilOrigin-Name:
d815f255dfbcd6d64326f7bc0ad3fe3c4ff08270ca75f8836ef2a919d5e57401
drh [Mon, 2 Oct 2017 02:52:54 +0000 (02:52 +0000)]
The query planner now always prefers to implement a FROM-clause subquery using
a co-routine rather than flattening the subquery into the outer query.
FossilOrigin-Name:
c9104b59c7ed360291f7f6fc8caae938e9840c77620d598e4096f78183bf807a
drh [Mon, 2 Oct 2017 02:32:12 +0000 (02:32 +0000)]
Improvements to a comment in lempar.c. No code changes.
FossilOrigin-Name:
8000d230171fe53599fc6a916666f60f88f789e6c9c6c2869514c02d837d6fc8
drh [Sat, 30 Sep 2017 11:47:06 +0000 (11:47 +0000)]
More details in the header comment of pushDownWhereTerms(). No changes to
code.
FossilOrigin-Name:
928486231ff7cc0df17a5aa23a080a1b8720e168db5227a7dbd34861283ba689
drh [Sat, 30 Sep 2017 10:50:34 +0000 (10:50 +0000)]
Make sure the SQLITE_Stat34 optimization switch is always 0x800, a value
which is hard-coded in the TH3 test suite.
FossilOrigin-Name:
6aed4ea34c4163c682ad5bb2956fdf4f3a3ad048fefd3edab0fef6761c3783cc
drh [Sat, 30 Sep 2017 01:25:04 +0000 (01:25 +0000)]
Fix unreachable conditionals and revise a testcase that was made obsolete by
the changes on this branch.
FossilOrigin-Name:
71f0adf7ca6824c3aba69104b9976dbb71b377474529e1a36220b4804293501e
drh [Fri, 29 Sep 2017 22:13:24 +0000 (22:13 +0000)]
Always render a subquery that is not part of a join as a co-routine.
FossilOrigin-Name:
6b1651d711eae6e7c65a191f02ca2439160bcd677099712289e76a0f8422fd37
drh [Fri, 29 Sep 2017 16:08:46 +0000 (16:08 +0000)]
Merge the query flattener comment improvements from trunk.
FossilOrigin-Name:
f62cd4d940506c39db82e83ff3df8ab1856f1fb91ffda835ae2d727263ee9b0b
drh [Fri, 29 Sep 2017 16:07:56 +0000 (16:07 +0000)]
Clean up the comments on the query flattener to more clearly and accurately
express the conditions under which the flattener is able to run.
FossilOrigin-Name:
0840f9f824c16212ce3fd6c859e501176eb0a58924ea1728a54d5bdfd0c25c86
drh [Fri, 29 Sep 2017 14:31:16 +0000 (14:31 +0000)]
drh [Fri, 29 Sep 2017 12:44:52 +0000 (12:44 +0000)]
Make sure the 6th parameter to the authorizer callback for view subqueries
has the correct view name.
FossilOrigin-Name:
2a45bbc9fd1c64f1c4c4dac38f063cd67480fcb6da24bf93fdefbfca66fd81ab
drh [Fri, 29 Sep 2017 12:12:52 +0000 (12:12 +0000)]
Better names for subqueries in EXPLAIN comments.
FossilOrigin-Name:
04ef40a8fea88776e0d8b73d942922d45d0c038fbfac1a9a82b9322181b4ad92
drh [Thu, 28 Sep 2017 20:06:53 +0000 (20:06 +0000)]
Do not flatten subqueries that contain an ORDER BY or GROUP BY clause and
can be implemented using a co-routine.
FossilOrigin-Name:
042d655dd9002e8b89a798ad955b0285891aecf79f6978c5312e70ffe0609a46
drh [Thu, 28 Sep 2017 17:29:24 +0000 (17:29 +0000)]
Remove the (undocumented) query-planner control that prevents
a "SELECT ALL" subquery in FROM clause from being implemented as a co-routine.
FossilOrigin-Name:
ff2f5a31a2ac67a2fdbb25793e8013cb0e062ab90bdcba2d52a62d6d4d8b6d18
drh [Thu, 28 Sep 2017 16:56:55 +0000 (16:56 +0000)]
Fix over-length source code lines in select.c. No logic changes.
FossilOrigin-Name:
fd3267ef92384fcefaee7460a5ffbaf8ddcb6049eec36f72a7046a43e2871fbf
drh [Thu, 28 Sep 2017 13:47:35 +0000 (13:47 +0000)]
Fix an issue introduced by check-in [
4cd2a9672c59 ] (2017-03-03) that could
allow a negative value in the 3rd parameter to memmove() when
defragmentPage() is called on a btree page with a corrupted
freeblock list. The corruption is now detected early and results in
an SQLITE_CORRUPT return before the memmove() is reached.
FossilOrigin-Name:
5b9ae693120fe4f7bc3b6270f35d773876f6cc8f5990e05cce0d255c54b36ae7
drh [Thu, 28 Sep 2017 01:58:23 +0000 (01:58 +0000)]
Add new routines to simplify dealing with collating sequences in expressions:
sqlite3ExprNNCollSeq() and sqlite3ExprCollSeqMatch().
FossilOrigin-Name:
490e488ea963fe725b16212822c8608f2b6abce688931b611446bc2cbfe6b87c
drh [Thu, 28 Sep 2017 01:09:42 +0000 (01:09 +0000)]
Indexes on expressions with a COLLATE clause are able to satisfy an ORDER BY
with the same COLLATE clause.
FossilOrigin-Name:
0413001843dce7c63659d39b329ca14cdcd54f4407922f51b2fb7659572a733e
drh [Thu, 28 Sep 2017 00:01:36 +0000 (00:01 +0000)]
In two places, change the magic number -1 to its proper symbol XN_ROWID.
FossilOrigin-Name:
80277d2fc9b76fe41e345d00952da1528e69884f25911cf6e4f78b09ff778421
drh [Wed, 27 Sep 2017 16:51:00 +0000 (16:51 +0000)]
Disable tests for the LIKE optimization when ICU is enabled, since the
LIKE optimization only works for the built-in LIKE operator and ICU overrides
the built-in.
FossilOrigin-Name:
f5ef2e1bcd2790f960c15947f87cda19bd6a6a384ad09b25f6d07d5244cfecbd
dan [Mon, 25 Sep 2017 09:37:37 +0000 (09:37 +0000)]
mistachkin [Fri, 22 Sep 2017 16:23:23 +0000 (16:23 +0000)]
Use the updated Win32 VFS semantics for winOpen from check-in [
5d03c738e9 ] for WinRT, et al, as well.
FossilOrigin-Name:
2c03d8b8f028b6a736aaf2cf8b28a51b3434cf341c95cf3a80469e0a24acdd98
drh [Fri, 22 Sep 2017 12:52:31 +0000 (12:52 +0000)]
Partial backout of check-in [
e0af9a904076 ]. It turns out we do need some
extra space at the end of the record blob as an overrun area to use when
decoding a maliciously malformed record.
FossilOrigin-Name:
403b88a894d877b85bcc33133abad06c3c576e4928de4a4b0c091f74c4015355
drh [Fri, 22 Sep 2017 00:24:44 +0000 (00:24 +0000)]
Update the configure script so that it looks for tclsh8.7 ahead of tclsh8.6.
FossilOrigin-Name:
0a12915b373cd0491a58d8f7a645711c620c70efced623e6b40aa01f23284157
drh [Thu, 21 Sep 2017 20:43:48 +0000 (20:43 +0000)]
In the Windows VFS, when trying to open a database file read/write, if it
fails check to see if the file exists and is read-only and immediately fall
back to a read-only open attempt, rather than running the AV retry loop.
FossilOrigin-Name:
5d03c738e93d36815248991d9ed3d62297ba1bb966e602e7874410076c144f43
drh [Thu, 21 Sep 2017 20:03:17 +0000 (20:03 +0000)]
In the Windows VFS, do not emit an SQLITE_CANTOPEN error log message when
falling back from SQLITE_OPEN_READWRITE to SQLITE_OPEN_READONLY. Wait until
the open fails completely.
FossilOrigin-Name:
fa3f5bcc23d9342f6df8ea15732988d637e9fa5dade85a73b05a9f66136d6964
drh [Thu, 21 Sep 2017 19:08:25 +0000 (19:08 +0000)]
drh [Thu, 21 Sep 2017 13:11:47 +0000 (13:11 +0000)]
Fix a potential use of an uninitialized pointer in RTree following an OOM
error.
FossilOrigin-Name:
fd4ec0cdbd84f3333dd4c7a4236491bce6b9ab21fb2c088751ca1279b31bd864
drh [Thu, 21 Sep 2017 10:24:10 +0000 (10:24 +0000)]
Fix a bug in tool/mksourceid.c:
The mksourceid.c program was incorrectly including the "# Remove this line"
line of the Fossil-generated "manifest" file in the SHA3 hash. That means
that all SQLITE_SOURCE_IDs for trunk versions going back to
check-in [
30966d56 ] (2017-08-22) are incorrect.
FossilOrigin-Name:
65765222ef6f4e80c05a24994fcee145f5fbc0ad35c9fab3d75492964b3eb187
drh [Thu, 21 Sep 2017 01:04:30 +0000 (01:04 +0000)]
Revert one performance improvement changes from check-in [
3b3e32d4cd07 ] as
it was causing a reference to an uninitialized value.
FossilOrigin-Name:
f8b1c64d3eeb8413ca149f34cc00f9154a5446d06ad33bbffa69118e6110f81d
drh [Thu, 21 Sep 2017 00:49:15 +0000 (00:49 +0000)]
Fix the rendering of the P4_INTARRAY argument to the OP_IntegrityCk opcode
in the output of EXPLAIN.
FossilOrigin-Name:
adc12c83dda8ba93ca220bbff649f763058b9440968ae463621f0cb7de8889cf
drh [Wed, 20 Sep 2017 18:47:51 +0000 (18:47 +0000)]
Size and performance optimization on sqlite3VdbeMemGrow().
FossilOrigin-Name:
4b3f7eacb862fbb5b75cf50b72fb60dfbd0acb5818e9f83383a6a63c8bbeacdf
drh [Wed, 20 Sep 2017 18:07:50 +0000 (18:07 +0000)]
The BLOB returned by sqlite3VdbeMemFromBtree() does not need to be
zero-terminated.
FossilOrigin-Name:
e0af9a9040768adf8bba42a8780adeb6304bc442afb1f35d239d019db1624f40
drh [Wed, 20 Sep 2017 17:49:12 +0000 (17:49 +0000)]
Small size and performance optimization in the bytecode engine.
FossilOrigin-Name:
3b3e32d4cd07a1d2d1708fffa47819345ae6b39205a9f548280d499c8f481d64
drh [Wed, 20 Sep 2017 10:47:10 +0000 (10:47 +0000)]
Improved resolution of large integer values in "CAST(x AS NUMERIC)".
FossilOrigin-Name:
7f2bd4ff45fba29528c18cac6da983bd9b164303525d3965056f5b40f85dc83f
drh [Wed, 20 Sep 2017 09:09:34 +0000 (09:09 +0000)]
Updates to the "lemon.html" document received from Andy Goth.
FossilOrigin-Name:
5b2002f3df1902aaa571a0efd01ab8bae7f4d37ac4819cc51595277f4de93433
drh [Mon, 18 Sep 2017 18:17:01 +0000 (18:17 +0000)]
Add the sqlite3_mmap_warm() function as an extension in the ext/misc/mmapwarm.c source file.
FossilOrigin-Name:
1b2de41453ac33de82f9cd6cbb92eee4fe184fb282c27e5efa5243c8cb239630
drh [Mon, 18 Sep 2017 18:08:54 +0000 (18:08 +0000)]
dan [Mon, 18 Sep 2017 16:28:56 +0000 (16:28 +0000)]
Add extension "mmapwarm.c". Provides function sqlite3_mmap_warm(), used to
"warm up" the memory mapping used by SQLite in mmap mode to access db file
content.
FossilOrigin-Name:
d4a30b91f9aad93510baead8c04ee51b82c98763be5a224ed4873298214c963a
drh [Mon, 18 Sep 2017 13:16:10 +0000 (13:16 +0000)]
Minor simplification of error message generation during compound query
code generation.
FossilOrigin-Name:
a944719314e0ac2f1954b65668815769eba3ab3e39a74666293b8dea52a184b2
drh [Mon, 18 Sep 2017 09:40:46 +0000 (09:40 +0000)]
The out-of-bounds read on recovery fix of check-in [
378afa16381a222a ] caused
problems for some corner-case error conditions. This alternative fix appears
to work better.
FossilOrigin-Name:
74f399d81fe250e09fde730ac0c17fe8b2b776ed32a3f576adaad56090f2b7fa
drh [Mon, 18 Sep 2017 00:18:31 +0000 (00:18 +0000)]
Fix the CSV virtual table extension so that it works when the default character
is unsigned.
FossilOrigin-Name:
42f07775556758754e92e29a759d200d0d81d16eee83ab982b840db11292f834
drh [Sun, 17 Sep 2017 19:45:28 +0000 (19:45 +0000)]
Do not make the assumption (as check-in [
4da49a95c0f07 ] incorrectly did) that
the ExprList returned by sqlite3ExprListDup() would never be passed into
sqlite3ExprListAppend(). Include a new test case that shows this sometimes
does happen.
FossilOrigin-Name:
29227d00a9999f0f28a0b55ef70183799a667c3b9d81d2e5ac0ab1840bef98b1
drh [Sat, 16 Sep 2017 20:58:41 +0000 (20:58 +0000)]
Simplify the sqlite3VdbeGet() routine. Smaller, faster, and easier to maintain.
FossilOrigin-Name:
5dbb255a9377a6c2619fbac519f18caa4d8cb23257dfba0ffb9e36dd9dc16627
drh [Fri, 15 Sep 2017 17:40:34 +0000 (17:40 +0000)]
Remove an unnecessary parameter from selectInnerLoop().
FossilOrigin-Name:
dd95887f82739d05585edfb70913fdaaab154de46c4d3113dd32d283767fb6fc
drh [Fri, 15 Sep 2017 15:38:01 +0000 (15:38 +0000)]
Improved the header-comment documentation on sqlite3ExprCodeExprList().
No changes to code.
FossilOrigin-Name:
5dc3ecb5f67968545fb35ceed61ad625e069c4e744c5c3ebaea65e2fee347a5f
drh [Fri, 15 Sep 2017 15:17:48 +0000 (15:17 +0000)]
Optimization to the ExprList object to make it slightly smaller and faster.
FossilOrigin-Name:
4da49a95c0f07ed7790169e8833c3e2dacda504a3d997f567572020148abe30b
drh [Fri, 15 Sep 2017 14:36:13 +0000 (14:36 +0000)]
Fix a harmless comment typo. No changes to code.
FossilOrigin-Name:
f7f0bf1da03f7fc1647ef172d9cb71a2ac46f136d4dee8e3a24e39313a981eb5
dan [Thu, 14 Sep 2017 21:12:07 +0000 (21:12 +0000)]
Add another test case for the problem fixed by the previous commit.
FossilOrigin-Name:
1a7e0b61c8a6bdd3ed105b9bc8a3732668fd7a897d2ed16c99445498e3c87089
dan [Thu, 14 Sep 2017 20:41:17 +0000 (20:41 +0000)]
Avoid an out-of-bounds read that can be caused by a specially constructed
journal file.
FossilOrigin-Name:
cf5bf42cad6e019a38dc0a36ff1f53ada619eef5259e175c3554a16669e03202
drh [Thu, 14 Sep 2017 02:36:27 +0000 (02:36 +0000)]
Avoid an out-of-bounds read on a recovery attempt using a carefully crafted
database and rollback journal with mismatched page sizes. The test case for
this is in TH3.
FossilOrigin-Name:
378afa16381a222aafa6009dbbbc92473a69683537f1c265694678b0595a42c8
drh [Wed, 13 Sep 2017 20:20:36 +0000 (20:20 +0000)]
Test case update due to PRAGMA integrity_check enhancements in [
8525c30c ].
No changes to code.
FossilOrigin-Name:
43c6023bbf6b808ab4cfdbd1a63a516cbe2f1794c7787f8230632bae12e2ff59
drh [Wed, 13 Sep 2017 12:55:59 +0000 (12:55 +0000)]
Disable FTS3 matchinfo() tests that assume a littleEndian platform when
running on bigEndian.
FossilOrigin-Name:
87ccdf9cbb9284553330683d4971be4f523ce922089aee6dffccfc18b3004263
drh [Wed, 13 Sep 2017 00:33:36 +0000 (00:33 +0000)]
Improvements to PRAGMA integrity_check for better detection of malformed
records. Integrity_check now avoids returning SQLITE_CORRUPT on a corrupt
record. Also includes microoptimizations that I stumbled over while working
on integrity_check.
FossilOrigin-Name:
8525c30c1d6676e51b9d9c642450aae3722c129edafdbc39b8435fcfe09b1817
drh [Wed, 13 Sep 2017 00:13:05 +0000 (00:13 +0000)]
PRAGMA integrity_check returns SQLITE_OK even if it encounters corruption
while scanning indexes.
FossilOrigin-Name:
81f62e99f27dedf3dc10fa1593c4cd9fc158680867206aee853e503a0cc8df71
mistachkin [Wed, 13 Sep 2017 00:01:26 +0000 (00:01 +0000)]
Fix test script comment. No changes to code.
FossilOrigin-Name:
a5a1949259a26c3330d7b1dcf38a8dd2e9b2c3af8d52f937e8537df138c9a55a