drh
f2cf412a0a
Fix a harmless compiler warning in fuzzcheck. Add new OSSFuzz test cases
...
to the test case library.
FossilOrigin-Name: d2619746cb233f4be127a77988548dd1d90eebddf0d0ac9107913b240553e5d0
2018-05-08 13:03:31 +00:00
drh
5ecf9039b0
Fuzz test cases for UPSERT.
...
FossilOrigin-Name: fd11fbd21893d520de5a2249f825ecb5839fa4943f5c207e9e9bf8b52f4e2695
2018-05-08 12:49:53 +00:00
drh
89ee229810
Activate the cell-overwrite optimization for index b-trees.
...
FossilOrigin-Name: a68697d10ef17d452c8279181186faad7bc54e3a35858a336552f717449065ea
2018-05-07 18:41:19 +00:00
drh
d720d394d0
Improved comments on the cell-overwrite optimization code.
...
FossilOrigin-Name: a4fe966da2fc479b18bf521ff596000410af3a611f7d8723d126795e595ccf22
2018-05-07 17:27:04 +00:00
drh
e3c05a5597
On an UPDATE, try to overwrite an existing btree cell with the modified
...
content, if the old and new cell are the same size. Use memcmp() first
to avoid dirtying pages that are unchanged.
FossilOrigin-Name: 5887d8beb502ad62689d31b850f46ab50831a1e9db36adf20d55ad45619d207e
2018-05-07 11:48:22 +00:00
drh
e2188f0b0f
Fix harmless compiler warnings associated with the new EXPLAIN QUERY PLAN logic.
...
FossilOrigin-Name: 374d8e264487b0437a8d995ced1bc026a92d495a2d0568f65f033e9ebe11d0e2
2018-05-07 11:37:34 +00:00
drh
30f7a25325
Fix harmless compiler warnings in the cell-overwrite logic.
...
FossilOrigin-Name: 3e11dc3183bc3e8ec49af244a8e8b3e07d12f7a2e59028b2bf64ce0ab589a91f
2018-05-07 11:29:59 +00:00
drh
60208c34bb
Backout change [05fee1a21ea398f1e4d6f1cf3] because it does not take into
...
account the LD_LIBRARY_PATH environment variable used by dl_open().
FossilOrigin-Name: b348d1193a7a3ed4d3e656b6cc95a41f87eae29222e0723850a5eb5ffabffd00
2018-05-07 02:50:38 +00:00
drh
c6f36fa33a
In an ORDER BY LIMIT, make sure the ORDER BY expression evaluator does not
...
try to reuse values from the result set if the result set has not yet
be computed. This fixes a bug in the recent deferred-row loading
optimization, check-in [c381f0ea57002a264fd958b28e].
OSSFuzz discovered the problem.
FossilOrigin-Name: 5d61e75f32de09c81dbe844443209f063cccb005d60b846900de5b023643fc3b
2018-05-05 16:50:35 +00:00
drh
6fcf83a503
Fix a slightly incorrect corruption detection branch in the btree logic.
...
FossilOrigin-Name: 9191ff670cb7f36e0b2dac4a22888679b639845687aef8edcc3c05e35ba71eda
2018-05-05 01:23:28 +00:00
drh
cb737dc29e
Merge enhancements from trunk.
...
FossilOrigin-Name: 9650f71b82ca1b3759e776bbd8a2e8ca61c51f80038e37c9c9a675a8c13b0b06
2018-05-04 19:18:27 +00:00
drh
e3d511c078
Fix requirements marks. No code changes.
...
FossilOrigin-Name: 7fdad122a21e4b01bd678198fd5131dc32febe3af366bd6368505398255f9822
2018-05-04 18:32:11 +00:00
drh
e632ae796a
For the amalgamation-tarball, enable FTS5 and JSON1 by default and
...
provide a new --enable-debug option that actives debugging facilities.
FossilOrigin-Name: 03edecaf9dcfc927aa60c2a17590a432b17de1647d480d277b4aafc8018c2d20
2018-05-04 04:49:55 +00:00
drh
5d72d9245d
Make a separate limb in the EXPLAIN QUERY PLAN output for the various lines
...
associated with the OR-optimization.
FossilOrigin-Name: 75ac7b4e4fd0811ca80c719badacff207e0bbd00ac64dde3b3d4ec676fad472d
2018-05-04 00:39:43 +00:00
drh
4388522561
In ORDER BY LIMIT queries, try to evaluate the ORDER BY terms first, and it
...
it becomes clear that the row will not come in under the LIMIT, then skip
evaluation of the other columns.
FossilOrigin-Name: c381f0ea57002a264fd958b28e4921cb9c9e73a10fb592f6bb64e6bc9bd16d39
2018-05-03 23:20:06 +00:00
drh
5e8b9853da
Fix a branch that has become unreachable due to recent enhancements.
...
FossilOrigin-Name: 81ab5e0d106fb9f2de80d17c8167d8542c6721b8d7ec69c43e1571c2dcadeddd
2018-05-03 22:52:56 +00:00
drh
34b27edc80
Improved security for VACUUM. This check-in combines the fixes
...
of [ab0d99d0b5ede] and [27754b74ddf646] in a way that is less likely to
to be broken by future changes.
FossilOrigin-Name: 260fc696538b195e8decabaab46771f664fb829b539efa86fb0b8170db01fa0a
2018-05-03 21:51:30 +00:00
drh
98b677f2cb
Overhaul of EXPLAIN QUERY PLAN. The output is now in the form of a tree.
...
More details of the query plan are shown, and what is shown is truer to what
actually happens.
FossilOrigin-Name: ff01bbdabc4b9db3db8b928979442c91b32d72082158e4f5fe62ae51a73649d2
2018-05-03 19:56:50 +00:00
drh
4d79983ca5
Optimizations to the new EQP framework.
...
FossilOrigin-Name: 956fef361a795bd081d8e23ce4075dc8aafcee63ab7275d13b657b529d185b30
2018-05-03 19:47:14 +00:00
drh
d5aa9262a6
Fix various error handling conditions on the cell overwrite optimization.
...
Fix a test case so that it works with the new optimization.
FossilOrigin-Name: f89b54f41405ed7e28132f66b8a0c690a087c2412c8f55790c2beabb0b521645
2018-05-03 16:56:06 +00:00
drh
da65fc6e32
The BtCursor.info fields are only valid if info.nSize!=0.
...
FossilOrigin-Name: 54c537eead5b08104cfaf0d5b1e2706e53d6f74be2ca02e06229024fd889fc94
2018-05-03 14:07:18 +00:00
drh
4f84e9c7e2
Add more corruption checking to the cell overwrite logic.
...
FossilOrigin-Name: 58d14afe1e1288d114ea213458b3121e0a95670887861928858b7f143c76f789
2018-05-03 13:56:23 +00:00
drh
9b03192e15
Bug fixes in the overwrite optimization.
...
FossilOrigin-Name: 0cb6cd2a6a596afaa1cca6c5f5abc2ea75d04f254c7debaf36ecd6a90b66aed6
2018-05-03 12:57:48 +00:00
drh
3de5d16cf7
The sqlite3BtreeInsert() routine tries to overwrite an existing cell with
...
modified content if the new content is the same size. Pages are only dirtied
if they change. This prototype works some, but still has issues.
FossilOrigin-Name: 489451b378819621537231c1c8a07704437e11c1f5384fd53b09f3977d2213a4
2018-05-03 03:59:02 +00:00
drh
fa16f5d9d6
Enhance EXPLAIN QUERY PLAN to report the generation of constant rows using
...
VALUES or just a SELECT without FROM.
FossilOrigin-Name: c75eee69fa8a9b56ee58a4cc539e80cc982f43390dc3a357344d58479dd89a41
2018-05-03 01:37:13 +00:00
drh
cdf88760da
More test case updates. Tests are all running now.
...
FossilOrigin-Name: dab5e5294813891469660cceb211ac1a1e526715bb57dcdbb1ab90321e6a4dad
2018-05-02 19:42:33 +00:00
drh
b3f0276b9e
Fix test cases so that they work with the new EXPLAIN QUERY PLAN output
...
format. Only some of the cases have been fixed. This is an incremental
check-in.
FossilOrigin-Name: 5f0e803e33aa557865d5fc830d9202d628de9a94c9757058ca48f1a560702cd3
2018-05-02 18:00:17 +00:00
drh
84a01debf9
Improved EQP output for recursive CTEs and multi-value VALUES clauses.
...
FossilOrigin-Name: f2f525548c65f89f55cbe91da8a21512dedc6f7b68b58b7906d653e800a2963a
2018-05-02 16:13:48 +00:00
drh
85a40ebc03
Prevent VACUUM from running any commands in sqlite_master.sql other than
...
CREATE statements. That is all that should be there anyhow. This fixes
a problem discovered by OSSFuzz. Test cases in TH3.
FossilOrigin-Name: ab0d99d0b5edece4c639baa47ce1ca2c02774cb2515e5b7f36d9bd312ccd3310
2018-05-02 15:00:26 +00:00
drh
03c3905f94
Fix a dangling-else problem that was causing recursive CTEs to malfunction.
...
Begin fixing test cases to work with the new EQP output.
FossilOrigin-Name: 82ca44b82fed6814c84440ba8bfaa019488ab956e84ac165180e2fcece6facb2
2018-05-02 14:24:34 +00:00
dan
fa5c69f5cb
Fix a problem in the xBestIndex method of the closure extension causing it to
...
allocate non-contiguous argvIndex values in some cases (an "xBestIndex
malfunction" error).
FossilOrigin-Name: 0c67150749cb3d067e14b2dcac9c3489e0f14bd18c0387f1d9bc93d21fc96fe5
2018-05-02 08:12:22 +00:00
mistachkin
07430a8caf
Add sqlite3_win32_set_directory8() and sqlite3_win32_set_directory16() functions.
...
FossilOrigin-Name: 22089ea2bbea93eb1da7f08344789a5455077169443e40025f053d2a117f1c08
2018-05-02 03:01:50 +00:00
drh
c631ded5e8
Improvements to the EQP display for compound select statements.
...
FossilOrigin-Name: 699a77e479010a331b0423f157a2fbfc373688e3d0d04ae5e64376c00cb3d488
2018-05-02 02:22:22 +00:00
drh
e2ca99c907
Begin reengineering the EXPLAIN QUERY PLAN function to provide more
...
intuitive output.
FossilOrigin-Name: 70b48a7972dfbb44af3ccd8ccd830e984bec88d80a78b3566a5de86a16e7fc14
2018-05-02 00:33:43 +00:00
drh
8c2e6c5fe0
The SQLITE_ALLOW_SQLITE_MASTER_INDEX compile-time option allows a CREATE INDEX
...
statement against the sqlite_master table. Once created, the index works, and
is usable by legacy instances of SQLite.
FossilOrigin-Name: 853f3163597b9946c0cbeb808ea6fd33a0cf48ae6b8f4459c4165db377f33a9e
2018-05-01 18:39:31 +00:00
drh
bbd4ae5a2f
Defer loading result column values into registers on an ORDER BY LIMIT until
...
we know that the LIMIT does not exclude the current row.
FossilOrigin-Name: ce4ef46058f4aaea6623a41255a2e4b69bb24f16a287391df48f6bacdb4c4989
2018-04-30 19:32:49 +00:00
drh
b57e3ec5d8
Test cases added for SQLITE_DBCONFIG_RESET_DATABASE.
...
FossilOrigin-Name: 08665a9e2e50a0a1e62529884cf65f8090debe89a306a3904b53268729ab5ad5
2018-04-28 19:08:02 +00:00
dan
2b137d65f5
Fix an RBU problem causing spurious SQLITE_CONSTRAINT errors when restarting
...
an RBU update in which more than one source table writes to a single target
database table.
FossilOrigin-Name: 564ae8297d417ba4b7978e430d41f125007177673163f6ed9adc3a3974f73d24
2018-04-28 18:20:01 +00:00
drh
a19d09677b
Add the SQLITE_DBCONFIG_RESET_DATABASE control for resetting a corrupt
...
database file without closing any database connections. Added the
".dbconfig" command to the CLI.
FossilOrigin-Name: a200a49edeaca5a787a3036070f7ced3cb6e9495f8afe7b74d5cde02c79b20dc
2018-04-28 13:21:00 +00:00
drh
7df011969c
Add the SQLITE_DBCONFIG_RESET_DATABASE control as a replacement for
...
the reset_database pragma. Resetting the database should be hard enough
to do that it cannot be done by accident.
FossilOrigin-Name: ff836cb8b0377c5970ecb2b797702e2b5d208eda443ecbd55f4c238a3094b28a
2018-04-28 12:43:16 +00:00
drh
46462e35d3
Merge updates from trunk.
...
FossilOrigin-Name: 94877e495c563f101b51cd8891ca7665c7aab87ff526157f1dc1781e0a2a5d87
2018-04-28 11:22:53 +00:00
drh
1efa8023a1
Prevent deep recursions on nested COLLATE operators.
...
FossilOrigin-Name: 6e098ee415f1a530e17a942c9ba51d67c25a3ebff6b97377b7858d0b10bcec92
2018-04-28 04:16:43 +00:00
drh
6bfd973ce6
Fix compiler warnings in FTS3.
...
FossilOrigin-Name: de508e831a43f02c3b354a24ea34798da03c163bae5521c852c9ddd252723739
2018-04-28 04:10:55 +00:00
mistachkin
542805d174
Document and expose sqlite3_win32_set_directory() function for use on Win32.
...
FossilOrigin-Name: 7626b593405ca720e371b9f698b72b499b7c829bfe00f758140bc542cf970689
2018-04-28 01:46:22 +00:00
mistachkin
c1e1ffeafb
Add comments about the intended use of the sqlite3_data_directory variable as it pertains to the sqlite3_win32_set_directory function.
...
FossilOrigin-Name: d11c419756ce28fcc1f58df6bbe59a3d8d19d0441970aa7bfa216ba915ceddf5
2018-04-28 01:44:27 +00:00
drh
0314cf3aa5
Add the "PRAGMA reset_database=ON|OFF" command. When on, it causes the
...
database to appear to be empty, causing the next transaction to reset it to
an empty database.
FossilOrigin-Name: 02e1a13c1f04bb72599b98f51240c78d0d050de264fef5808fd97db3f4c16dac
2018-04-28 01:27:09 +00:00
mistachkin
95d5ae19d1
Document and expose sqlite3_win32_set_directory() function for use on Win32.
...
FossilOrigin-Name: cbce7180ee664367ee8fc1f8af703eb7845bb58ade6870cc3b7608dcbe5952b3
2018-04-27 22:42:37 +00:00
dan
03db962ab5
Update test script fts3expr4.test so that it always creates fts3 tokenizers in
...
the "en_US" locality.
FossilOrigin-Name: 576a8f69ae25883f752e58953624e9f7126db998bebaa1f07f7c2ec47aaecabe
2018-04-27 18:05:01 +00:00
dan
0ef54fa6e8
Fix a test script error causing tests to fail in soak.test.
...
FossilOrigin-Name: 462b52b121c1882e0eca819bc30c0f6e94d7fdd60047d2c32adeff3a1eb70546
2018-04-27 16:35:44 +00:00
drh
ef9e3d78f2
Enhance the comments in the templatevtab.c implementation.
...
FossilOrigin-Name: 05f6278a02e5cde89f76ced5af7d508e26576d7291dad7ee9e06b1a3be516cb0
2018-04-27 15:17:08 +00:00