drh
d3a4dbe4b8
Further fixes and improvements to the generate_series() enhancements on
...
this branch.
FossilOrigin-Name: b7d9bd7ee2f4100608063fdf7648f290351465d393bc876a89704f643358853e
2024-04-26 17:09:33 +00:00
drh
84a231eb61
Use hex flag masks rather than decimals in ext/misc/series.c.
...
FossilOrigin-Name: a94e2cd02873c283d46bf6c21d0306ad454881d7882bb167d043cc79f79a2396
2024-04-26 14:36:28 +00:00
dan
3afd5b6d65
Fix a problem allowing a LIMIT constraint to be passed to a virtual table in cases where there exist WHERE terms that cannot also be passed.
...
FossilOrigin-Name: 72c8ed9698dd2aadee7b84fd293e8306233f0fe5b5b5731687482444fdf461c7
2024-04-26 14:32:58 +00:00
drh
99ac2324aa
Fix handling of LIMIT and OFFSET in virtual tables that are part of
...
a compound SELECT.
FossilOrigin-Name: 40421c1c4ed5bb1ed79ad7ee37cb5a4f0b7864c1eb94abd8ee357ab2202cad30
2024-04-26 13:38:43 +00:00
drh
317b7416a6
Enhance the generated_series() table-valued-function to respond to
...
LIMIT and OFFSET. Use this to add new test cases for LIMIT and OFFSET
on virtual tables in a compound SELECT.
FossilOrigin-Name: 408d47ecaa3b906d0886f76a22b76339ec5878270ffe8d1838c74de09c29a33e
2024-04-26 13:30:48 +00:00
dan
d591a5b93d
Add test demonstrating the problem at [forum:/forumpost/c243b8f856|forum post c243b8f856]. No fix yet.
...
FossilOrigin-Name: 1685495c0a00238c9c92cce01af8108204a2fad22433ed3e7bba3c9da9ee0766
2024-04-26 12:01:17 +00:00
drh
ec14ef80b0
Improvement to the way that affinity is determined for columns of a
...
compound subquery. The affinity is the affinity of the left-most
arm of the compound subquery that has an affinity other than NONE, adjusted
to accommodate the data types coming out of the other arms.
FossilOrigin-Name: e6df846f36209bac3e420dd80ce2bbbd87ab7a20b8063fce05f78a3c7ab6027e
2024-04-25 23:26:11 +00:00
drh
ddc6bd9f21
Further improvements to the computation of affinity for compound subqueries:
...
make sure that the selected affinity is compatible with a literal values in
arms to the left of the arm that is used to determine affinity.
FossilOrigin-Name: bbdf22e3d989f42b963f1f2f219dfeac11db786f17ac27097ab72f72e7638a2a
2024-04-25 17:52:10 +00:00
drh
23afc2c4ec
Back out the previous change on this branch. In its place: Determine the
...
affinity of a subquery by the left-most arm of the subquery that has an
affinity other than NONE. In other words, scan from left to right looking
for an arm of the compound subquery with an affinity of BLOB, TEXT, INTEGER,
or REAL and pick the first one found. Or stay with NONE if no arm has a
defined affinity. Test cases added.
FossilOrigin-Name: b8ec8511b1968bbc1472b3e2e21f0fef1d5becebeb31f9d13ee3ca9e13abb1e5
2024-04-25 16:55:53 +00:00
stephan
c859f0267c
wasm: add a makefile comment about the static sqlite3.h/c version info injected into the JS files possibly differing from the runtime-emited version info when a user provides their own sqlite3.c.
...
FossilOrigin-Name: d99a01a0f6e1f70f70c9a0625aeaa8a8015eba352bcfb3978eafca6df10ba5a8
2024-04-25 06:52:19 +00:00
drh
f8e195159f
An experimental minor tweak to the way affinities are computed for compound
...
subqueries, when the actual affinity is ambiguous.
FossilOrigin-Name: 779723ad792ca24dd07b7a1425303c76b44bb173e718a33c26c9f7644e9912cb
2024-04-24 19:49:52 +00:00
drh
0868d58e2c
If a RETURNING clause contains a subquery that references the table that is
...
being updated in the statement that includes the RETURNING clause, then mark
the subquery as correlated sot hat it is recomputed for each result and not
just computed once and reused. See
[forum:/forumpost/2c83569ce8945d39|forum post 2c83569ce8945d39].
FossilOrigin-Name: 9ea6bcc8fdf6aadb756ec5bcaaa7af314167f8973bdd32fd23f83bd964f0c21e
2024-04-24 16:36:37 +00:00
dan
dfa6289153
Fix a case where a corrupt stat4 record could go unrecognized due to integer overflow.
...
FossilOrigin-Name: 240a4a48b27a2b1070bba6d7da76a8df8e3f1808e262045d7ad2cf910df08f3d
2024-04-24 14:18:20 +00:00
drh
35b771e221
Add comments linking the assert() added in [cef4d9e3ba586735] to the places
...
where the precondition that the assert() tests are actually required.
FossilOrigin-Name: 6f0e7e195275aeb4aefd9da20348af35e3ef7f0a6b2768a34824daeace16eff1
2024-04-24 11:51:51 +00:00
dan
5b27ecafbc
Avoid slowdown when exprNodeIsConstant() is called on deeply nested SQL functions.
...
FossilOrigin-Name: 1c0b0345451853846076467831884f951c92ec79476be40ce7f7b766fd2d8fc1
2024-04-24 11:40:47 +00:00
drh
b065eceb56
Ensure that temporary SrcItem objects created by trigger processing have
...
either SrcItem.zName or SrcItem.pSelect defined. Every SrcItem should have
one or the other.
FossilOrigin-Name: cef4d9e3ba586735598f03eb5e8f29072c9e6f62b0d34ddd2fb3ed1795f6e21c
2024-04-24 11:21:27 +00:00
stephan
99200b2f07
Remove an undocumented feature from the JS Worker1.open API because it relies on broken behavior which has no VFS-agnostic workaround.
...
FossilOrigin-Name: 3a640038c70c8511e7051af83aa35d163c4f96f05c5064cffd3e4e2e63cd44a9
2024-04-24 06:43:17 +00:00
drh
14602eafa7
Fix a problem with vector IN operators used with an index where the affinities
...
and collations for the various vector terms are different.
FossilOrigin-Name: 86e8c782e7494377de3c27b750cd83a7eb2302c1182ee2004d3864db50fca557
2024-04-23 12:02:03 +00:00
dan
0309fb919a
Fix an uninitialized variable problem in the new code on this branch.
...
FossilOrigin-Name: 85625b38718c6e4cf7aa97fa3c52153bd25c810b68f19e7924e1f4b709c6a05d
2024-04-23 11:56:20 +00:00
stephan
3ac612dd7d
Remove some dead WASM-side code.
...
FossilOrigin-Name: 0a07ee27bd6021a6fc1d81133012592351530ffcf6ae09322ea74624cff910df
2024-04-23 06:49:47 +00:00
stephan
642e950e63
Minor touchups in JS docs and exception messages.
...
FossilOrigin-Name: 9e7fc9370dfca121244f7a2941e8de629b277f1799f8de08a43ff1d86f94b6f5
2024-04-23 06:36:28 +00:00
stephan
6e6dfd6a23
When running the 'dist' target in ext/wasm for an SEE-capable build, ensure that the resulting zip file and directory name include '-see'.
...
FossilOrigin-Name: 04c552b12e3b77b9dfd83838d35ce19a37ed024a8c18a2000ada10cf3d1eb6ad
2024-04-23 05:38:49 +00:00
dan
46435a04fd
Add extra tests for aborting conflicts in the sessions module.
...
FossilOrigin-Name: b4a6d32662acacb7767cfb9b8e040e6eb1f99322cb7d0cd44e6265e9ac2fb2e8
2024-04-22 20:09:17 +00:00
stephan
5d8daf184d
Minor cleanups to [8fbda563d2f5].
...
FossilOrigin-Name: 5ee2594b657b96aea9e482a175820dcbacfa9298da45b38cf17f39ad076d3f7f
2024-04-22 17:03:52 +00:00
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
dan
5749e1ee43
Slight performance improvement for the new code on this branch.
...
FossilOrigin-Name: 500c67f1341fe2a7e7333d525c90df201cc73a683b943ad5c1e41d4a4f639043
2024-04-20 19:19:30 +00:00
dan
d737feeacf
Fix a problem where an expression like (a, b) IN (SELECT ...) might not use an index on (a, b) if the affinities and collation sequences of "a" and "b" are not identical.
...
FossilOrigin-Name: 4d870fd8b5450047a7486fc023d1ac9439642e8ed91eadfd5026c4cda7cc9179
2024-04-20 15:14:06 +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