stephan
0a42e9913b
Extend the JS/WASM SEE build support by (A) filtering SEE-related bits out of the JS when not building with SEE and (B) accepting an optional key/textkey/hexkey option to the sqlite3.oo1.DB and subclass constructors to create/open SEE-encrypted databases with. Demonstrate SEE in the test app using the kvvfs. This obviates the changes made in [5c505ee8a7].
...
FossilOrigin-Name: 8fbda563d2f56f8dd3f695a5711e4356de79035f332270db45d4b33ed52fdfd2
2024-04-22 16:46:37 +00:00
drh
4f2f6c74ca
Extra robustness in the code that causes cursors to return NULL when they
...
are participating in an OUTER JOIN.
FossilOrigin-Name: 672c2869ef48e08447d37b0d76a1850cdafbe30ca1906ec98c55e3ab496fd9a6
2024-04-22 13:31:24 +00:00
stephan
2469350ad9
For sqlite3.oo1.DB JavaScript classes, bypass execution of any on-open() SQL in SEE-capable builds because it would necessarily run before the client has an opportunity to provide their decryption key, which would leave the db handle in an unusable state and cause the ctor to throw. This currently affects only the OPFS VFSes. We may want to consider extending the ctor options object to optionally accept an SEE key and apply it when opening the db.
...
FossilOrigin-Name: 5c505ee8a73f4b4a7053d98a12024d98340676f6ae9982311f9f88a9b46c8ae2
2024-04-22 11:48:03 +00:00
drh
2c26adb873
Continuation of the fix at [8c0f69e0e4ae0a44]: If a viaCoroutine FROM clause
...
term is participating in a RIGHT or FULL JOIN, we have to create an
always-NULL pseudo-cursor for that term when processing the RIGHT join.
dbsqlfuzz 6fd1ff3a64bef4a6c092e8d757548e95698b0df5.
FossilOrigin-Name: e1040e51ebd04f2a076f477b6f240f849afb10f543ebe518e09d6842cc3cb38e
2024-04-22 00:42:47 +00:00
drh
db2a33a3dd
Fix an indentation problem in debugging routine sqlite3ShowSrcList(). No
...
changes to production code.
FossilOrigin-Name: 5560df2726fed215c98d602c5f6ebbf3c5ae23f8ba1074291c509bf446fdfe66
2024-04-21 23:35:58 +00:00
drh
0526db32e2
Correct handling of OUTER JOIN when on or the other operand is a subquery
...
implemented using the VALUES-as-coroutine optimization.
dbsqlfuzz bde3bf80aedf25afa56e2997a0545a314765d3f8.
FossilOrigin-Name: 8c0f69e0e4ae0a446838cc193bfd4395fd251f3c7659b35ac388e5a0a7650a66
2024-04-18 16:11:01 +00:00
drh
06915d0145
The first assert() added in [0ebc65481f4a3e79] is not necessarily true in a
...
corrupt database file. So add a term to make it true.
FossilOrigin-Name: 6b21cccdeec92db9f6ce3dd7ea5e61b8b46650cc1e550271aa51bdc619f55b11
2024-04-15 20:43:21 +00:00
drh
0221cacea7
If a build fails in testrunner.tcl, do not attempt to run the jobs that
...
depend on that build. Instead, report those jobs as having been skipped.
FossilOrigin-Name: b40580be719a129ecd1aa3c69d1086c967d063920fdd48617c864e73c059abc1
2024-04-12 18:46:34 +00:00
drh
6f4e5ee4c9
Fixes and new tests logic to ensure that the btree overflow page cache is
...
only used when it is consistent. This resolves the malfunction observed
in [forum:/forumpost/284955a3cd454a15|forum post 284955a3cd454a15].
FossilOrigin-Name: 5dede50d9e7b6942df9f7b00fbfeaa2103c36c5da01d63d88136fb0ef4b7d26d
2024-04-12 15:02:16 +00:00
drh
1d40237bc8
Add assert() statements to help verify the overflow page cache.
...
FossilOrigin-Name: 0ebc65481f4a3e7974558adea51c620a025bc0e76c0a139e549b56c5abe0cabb
2024-04-12 13:05:36 +00:00
drh
ae7ede4a4f
New assert() statements to verify the correctness of the BTCF_AtLast flag
...
on btree cursors.
FossilOrigin-Name: 4efecd6167de71500c90b63155eba1b8567c90e9d1e282fbea54130f9ee21813
2024-04-12 12:32:09 +00:00
drh
366b419d00
Test case for the fix in the previous check-in.
...
FossilOrigin-Name: 0cf4d835dae260b01178e94e77be6b8a130f2031e898ef79ceba8df6c2bba58f
2024-04-12 11:28:35 +00:00
drh
c494fdb580
Mark the BTree cell overflow cache as invalid whenever the rowid goes invalid.
...
FossilOrigin-Name: 74c9e19c92c887012aebbe96450f6ed7a60ba22d6e3edbaa39a0f989fb7f2901
2024-04-12 02:57:52 +00:00
stephan
b6d108f0b3
Fix handling of the SQLITE_OMIT_WAL check in one place. Resolves [forum:87cc13302de160eb|forum post 87cc13302de160eb].
...
FossilOrigin-Name: 5dae6e6df4921f42e45c6c8de40853ab63f53a4bd1d9088a8cdac957ce62f196
2024-04-11 19:08:12 +00:00
dan
495ce22d49
Fix a "shift exponent is too large" usan error that could occur in the fts3 snippet() function when a query phrase contains more than 64 tokens.
...
FossilOrigin-Name: 6d2c7ac4ecfc1ec408cb1820985a70650d7cc5613b4b8fd1829f68ea48fce6a3
2024-04-09 19:23:18 +00:00
dan
73a50fa42c
Avoid some performance problems in the recover extension when recovering strategically corrupted databases.
...
FossilOrigin-Name: e66a834bbab9d71e02b70588ad4c71eae2e13b50e299b0269d488402bc4a7fc5
2024-04-09 15:09:54 +00:00
drh
d21d5b21db
The read-only CHECK-constraint optimization of [34ddf02d3d21151b] inhibits the
...
xfer optimization for tables with CHECK constraints. However, the xfer
optimization is required for correct operation of VACUUM INTO on tables that
contain generated columns. Fix this by ignoring CHECK constraints when
qualifying the xfer optimization while running VACUUM. Problem reported by
[forum:/forumpost/3ec177d68fe7fa2c|forum post 3ec177d68fe7fa2c].
FossilOrigin-Name: a6e26e778812c8409fca77183e24d3b70189c4d02fce10c7e74cd4ccc8c8ea97
2024-04-09 13:57:27 +00:00
dan
1278ac411c
Update tests in returning1.test to account for [c7896e88].
...
FossilOrigin-Name: c02956cd5cbf87027ba201b5d273e0efd429836ee6cabdc2f6d5b8096c876b7b
2024-04-08 17:55:15 +00:00
drh
d59afcfbfe
Enhance the WHERE-clause push-down optimization so that it is able to
...
push down WHERE clause terms that contain uncorrelated subqueries.
FossilOrigin-Name: 69ec714b2d698acf9e37635256c01b233ce32f22e8323e226441d5ddd948a940
2024-04-08 11:50:07 +00:00
drh
0389d5f8d0
Fix a harmless compiler warning in the ICU extension due to [acddbc489d5231da].
...
FossilOrigin-Name: 3d8750e88558f8ea6a1523a5add4ccca3262e31f348b603e56ab193d81908995
2024-04-08 11:45:15 +00:00
drh
ac94cf3ece
Enhancements to the fuzzer invariant checker to turn optimizations on and
...
off.
FossilOrigin-Name: 67594481379824823105939fea2ce1fe280667f6db91735ac78b4b6164a78dab
2024-04-08 06:37:19 +00:00
drh
5b613ed41b
Merge trunk testing enhancements into the pushdown-subquery branch.
...
FossilOrigin-Name: 287ff24b26a512ff7648679767e68244f6eef95df6a49c46ed1f2594030ed523
2024-04-07 18:55:57 +00:00
drh
fa4c4247a5
Omit all rowid-in-view restrictions from the fuzzinvariant.c test module
...
as they are no longer necessary, as of the previous check-in.
FossilOrigin-Name: 6431538f0bb3bb8606786f3c3e5c055c4bc387098dd3bdc8a94f6fda61c47f52
2024-04-07 18:36:32 +00:00
drh
1152def76e
If SQLITE_ALLOW_ROWID_IN_VIEW is set to 2, then all rowids for views return
...
a value of NULL.
FossilOrigin-Name: 0a53dde21403aa6de11c5085c16def3f95046c5629daf2675b075e4d6683ef94
2024-04-07 18:23:30 +00:00
drh
660322f96f
Merge trunk enhancements into the pushdown-subquery branch.
...
FossilOrigin-Name: 27865e316f8dfbf4c20290cf1be3024d7518fec46655e34f3fc435e15346c63e
2024-04-07 10:30:29 +00:00
drh
05c6d13027
Add comments to note the name abiguity between the MySQL push-down
...
optimization and the WHERE-clause push-down optimization.
FossilOrigin-Name: 3d5fb1ec7a0440072d6e3b957903c85d0f32b8b07207a1ef22d1a69cf5e664d1
2024-04-07 10:27:18 +00:00
drh
6951c49779
Do not allow changes to sqlite3ExprIsTableConstant() that support pushdown of
...
subqueries interfere with the hash-join logic.
FossilOrigin-Name: 8682931f9c6b40e1b09139c10bbe932c38330b5eb0c5c84f2432ad19a6793e37
2024-04-06 18:30:09 +00:00
drh
ed27183d83
Merge testing logic fixes on trunk into the pushdown-subquery branch.
...
FossilOrigin-Name: a4e1f03dcad70e828a4b56e7a332946daf84d6eae078e3ec9a248b8157a53963
2024-04-06 17:42:14 +00:00
drh
8181cc6c10
Improvements to the accurancy of the fuzzinvariants.c testing module when
...
SQLITE_ALLOW_ROWID_IN_VIEW is defined and the test query involves rowids.
FossilOrigin-Name: c6e873d4db3ef36a0d561e64ead6feada5d1654c0757b4b6e55f671c9db66469
2024-04-06 17:37:30 +00:00
drh
de6a4be9b5
Generalize pushdown to allow any uncorrelated subquery to be pushed down.
...
FossilOrigin-Name: 87c45fb0d5f5ca5d6d1ad27bef83f294231d17d94299e1997364a7975b423e38
2024-04-06 12:19:50 +00:00
drh
743ae4c68b
Experimental enhancement in which expressions of the form "expr IN table"
...
can be pushed down into subexpressions.
FossilOrigin-Name: 2cbd7838fd6ffdf210f34671cd2e3e749a076a3a6f155bbe5f910a67db31c5b1
2024-04-05 20:01:28 +00:00
drh
b411c4d69e
Check-in [a9657c87c53c1922] is wrong: the IndexedExpr.bMaybeNullRow flag is
...
required for virtual columns if they are part of an outer join. Add a
test case (derived from dbsqlfuzz b9e65e2f110df998f1306571fae7af6c01e4d92b)
to prove it.
FossilOrigin-Name: 4484ec6d26b31305e31de89bdbae26344d8083a7e7de20861430d31737d9979c
2024-04-05 13:56:05 +00:00
drh
65a1d7a284
When compiling with SQLITE_ALLOW_ROWID_IN_VIEW, if the RETURNING clause of
...
an UPDATE of a view specifies a rowid, then return NULL for the value of
that rowid. dbsqlfuzz 7863696e9e5ec10b29bcf5ab2681cd6c82a78a4a.
FossilOrigin-Name: c7896e88850669e18e89d44c4169d4f4a5d4b904bea6ccb2ac64f93b6d348a42
2024-04-05 11:23:51 +00:00
stephan
7fd9b53308
Optimize sqlite3.oo1.DB.exec() for the rowMode='object' case to avoid converting the object property keys (column names) from native code to JS for each row. This speeds up large data sets considerably and addresses the report in [forum:3632183d2470617d|forum post 3632183d2470617d].
...
FossilOrigin-Name: 8b41ef8690001eb299f5b7182c28f5318333bff5b505e1d59d6e6f4556b1c759
2024-04-04 22:53:09 +00:00
drh
f895173c5f
Add the "interstage-heuristic" that attempts to avoid wildly inefficient
...
queries that use table scans instead of index lookups because the output
row estimates are inaccurate.
FossilOrigin-Name: 7bf49e2c54c9f6f336416f01c0e76aaf70f1e2f3fd612232e5a33ae5dabe0900
2024-04-04 14:26:42 +00:00
drh
634f434686
Fix an ASAN problem in part of the test harness. No changes to SQLite itself.
...
FossilOrigin-Name: 797cda7ddcceb140330d58892c3e73d28df72b638df00fd48f07dfcba7706c5f
2024-04-04 13:36:48 +00:00
drh
efe9500af7
Fix test cases due to an error message change.
...
FossilOrigin-Name: c49ec239eddde6f07f8d528cccd6224c4c80b240dc8f5c974186e3bb08afb83b
2024-04-04 13:07:43 +00:00
stephan
13f5910889
Fix exception propagation when the opfs-sahpool VFS fails to initialize to address report in [forum:be0141c639|forum post be0141c639].
...
FossilOrigin-Name: cdb3a90055afe371962ec6c0931f1b08797aaeaab0358ef64b1cabda0a855b33
2024-04-04 12:36:33 +00:00
drh
307f290b32
Add an optional 3rd argument to the icu_load_collation() function that
...
specifies the "strength" of the comparison.
FossilOrigin-Name: acddbc489d5231dacf29890d1aa562da499026690f55c256a07d04a3190faacc
2024-04-02 21:55:45 +00:00
drh
8ce73ce15b
Fix typos in comments. Provided ".wheretrace" debugging output for the
...
interstage heuristic module. Do omit automatic index loops in the
interstage heuristic.
FossilOrigin-Name: 186dcae19e249db36de15f295999cff25063b54ee3d5d481cd2ba99b6d13148e
2024-04-02 14:12:29 +00:00
drh
7f7d0b19f8
Add a heuristic in between the two solver() passes of the query planner that
...
tries to prevent a very slow query plan in cases where the output row count
estimate is imprecise.
FossilOrigin-Name: 8018417b0143ea11535f2457bf3e4b3755717c554a17df1076425b4251b5f2c6
2024-04-02 11:44:44 +00:00
drh
9352cfa30b
Improved comments in the query planner logic that computes the cost for a
...
particular step in a query plan. No code changes.
FossilOrigin-Name: 0b2ac2cdc767db764e3ea8bbc33898cac4e1ec27fe8c9b60ce08a1785f921e6d
2024-04-01 15:38:15 +00:00
stephan
69dbd7a4e7
Make explicit that sqlite3_keyword_name()'s index is 0-based, per forum request. Doc changes only.
...
FossilOrigin-Name: 090943dc31e7a3af5c11c1c0953cb82ae3ca07ba000189bb85deaecc76921504
2024-03-30 14:11:30 +00:00
stephan
cfd4507c83
Document that the order of an update hook call is unspecied vis-a-vis the final result of the operation which triggers that hook. Doc changes only.
...
FossilOrigin-Name: 3d4b1f0791384d3e531d6757daecf67e5b873954de61f37032474e3ae23cd22b
2024-03-28 10:58:18 +00:00
dan
6921a2d205
Update comments in fts5.h.
...
FossilOrigin-Name: 862945d5c432c27377e90d93d64c4655eefcc369d086eb51edef925fb3d80b57
2024-03-27 20:34:14 +00:00
dan
ed517a7082
Add extra tests to vtabL.test.
...
FossilOrigin-Name: fe209099f5c348f1280b9b827ffbf6a6742ebdd1a23ef189445147894b1832ba
2024-03-26 18:07:39 +00:00
dan
dcc121999c
Avoid expanding integer values in columns with real affinity to the full 8-byte representation when editing records as part of a DROP COLUMN command.
...
FossilOrigin-Name: a49296de0061931badaf3db6b965131a78b1c6c21b1eeb62815ea7adf767d0b3
2024-03-26 11:14:52 +00:00
drh
a509a90958
The RAISE() operator is not a constant expression and cannot participate in
...
the VALUE-as-coroutine optimization.
dbsqlfuzz 74cf7c9904360322a6c917e4934b127543d1cd51
FossilOrigin-Name: 6a06dc73847716c88d65651d1bf0e002002303881df1389beac884d0032eae08
2024-03-25 20:35:14 +00:00
dan
ca3b9096c4
Add further tests for sqlite3_declare_vtab().
...
FossilOrigin-Name: f3c4433f6b33087494c8d38ff9dbb008a1bd30b424ca9aaa51c1956d75a86249
2024-03-25 20:00:40 +00:00
drh
1872f8d844
Simplifications to the sqlite3_declare_vtab() implementation. Changes
...
some conditionals into assert() statements, for coverage.
FossilOrigin-Name: ff7b898a6f9cb9aecb51bd6b63e253b4b7486ac9367f59c3c0491d78cfb39993
2024-03-25 19:31:03 +00:00