drh
366b419d00
Test case for the fix in the previous check-in.
...
FossilOrigin-Name: 0cf4d835dae260b01178e94e77be6b8a130f2031e898ef79ceba8df6c2bba58f
2024-04-12 11:28:35 +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
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
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
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
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
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
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
efe9500af7
Fix test cases due to an error message change.
...
FossilOrigin-Name: c49ec239eddde6f07f8d528cccd6224c4c80b240dc8f5c974186e3bb08afb83b
2024-04-04 13:07:43 +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
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
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
dan
eb5bd4db91
Fix a theoretical OOB memory access in sqlite3_stmt_scanstatus_v2().
...
FossilOrigin-Name: 87be9580747b405c2c534beadb0f95cee0d4f34e0245f90e157a6b7ada38e092
2024-03-25 18:30:15 +00:00
drh
bcf97e70f5
Fix the pragma4.test script so that it works with SQLITE_OMIT_VIRTUALTABLE.
...
FossilOrigin-Name: f8fe6fb69c4164d087783a0d6990112afabea78daa4d8985eb6df7df6f45ac27
2024-03-25 13:18:46 +00:00
drh
99b4e6e254
Fix recent test case changes so that they also work on Windows.
...
FossilOrigin-Name: 38578b5af2e97c420f3106bc486318604aecbaa327365bbc2e9518be84491495
2024-03-25 12:28:06 +00:00
drh
cf84ae0189
Fix the xBestIndex method of the pragma virtual table so that it correctly
...
gives a higher cost to plans where the schema hidden parameter is
unconstrained. Fix for the problem reported by
[forum:/forumpost/85b6a8b6705fb77a|forum post 85b6a8b6705fb77a].
FossilOrigin-Name: bc516ff5202ee6e9834266bf755fe26e30ac557dcc7975ca7a06dfe33874fcd2
2024-03-24 21:10:45 +00:00
drh
d9eee787bd
Fix an adverse interaction between CREATE TABLE AS and the new
...
[/info/a120c9235f125e05|VALUES-as-coroutine] optimization.
dbsqlfuzz c2c5e7e08b7e489d270a26d895077a03f678c33b
FossilOrigin-Name: 84b6fdea0bf07c73df0ca8ef110db066164a5f34606e6c069a060476e04ef44e
2024-03-23 15:17:38 +00:00
drh
2faaf3830e
Test case for the assert() problem fixed by [9ba3cff9d48fe8fc].
...
FossilOrigin-Name: 865f0de7a17ce6059b8f0708002cff5f13b9dba3ebc41896ee0fdc21ae4f3740
2024-03-21 22:18:24 +00:00
drh
529ed1a3a3
Enhancements to testrunner.tcl:
...
(1) Add the "--config CONFIGS" option, to that only configuration named
on the comma-separated list CONFIGS are run.
(2) Add the "--omit CONFIGS" to omit configuration on the CONFIGS list
(3) Add the Android configuration to "release"
FossilOrigin-Name: 4ccb372967fab779b29be8f01c879a99ef247981466f81f55e18e3961fbd7d5a
2024-03-21 11:46:52 +00:00
dan
af64a22762
Have os_unix.c reuse cached file-descriptors in the case when a read-write fd is requested on a read-only file and a read-only fd returned.
...
FossilOrigin-Name: a678e85402af08c1e387bf30ff2205f84dd7da749755da565d70f831c007a3d9
2024-03-21 11:37:36 +00:00
drh
296ae1e467
Fix all test cases so that they work with SQLITE_ALLOW_ROWID_IN_VIEW.
...
FossilOrigin-Name: 66c69e2f20f7692e0f34743ae97b09c4d8d11b874cdc5381795f2d1e0410f724
2024-03-21 10:35:33 +00:00
dan
e555bd4f02
Change EXPLAIN QUERY PLAN output to say "USE TEMP B-TREE FOR LAST TERM OF ORDER BY", or "LAST N TERMS OF ORDER BY", instead of "RIGHT PART OF ORDER BY".
...
FossilOrigin-Name: cd547c500442f3f58c05d6da8a67c3238560c5204ea62ec14afa844cc8fb94f0
2024-03-20 16:27:08 +00:00
drh
36f01f2ee3
Return the error "ambiguous column name: rowid", instead of "no such column: rowid", when a "rowid" reference is ambiguous.
...
FossilOrigin-Name: 0615bdae2dfc70c7e0416a28e89ffde31fa44ed4b3dac46e5ef20eed0d89e58c
2024-03-19 19:56:39 +00:00
dan
ffbe492553
Update test scripts to account for [8fcea4cd].
...
FossilOrigin-Name: 0c543c51a8c5c8916f649a5e7fd3fedc9c05f2df36064b1699ea6f5e08eaa9e0
2024-03-19 16:51:18 +00:00
drh
e9feb0acfc
In the name resolver when SQLITE_ALLOW_ROWID_IN_INDEX is enabled, if there
...
are multiple views that might resolve to the "rowid" but only one real table,
then use that one real table and ignore the views.
FossilOrigin-Name: 8fcea4cdfc89dd78eca5e7f62aa31aff0e296f41e79349d3af1cc3a2bc4d77c6
2024-03-19 16:34:32 +00:00
dan
f891ef8d61
Update tests to work with SQLITE_ALLOW_ROWID_IN_VIEW.
...
FossilOrigin-Name: 495b8c7b08b998ddfe2ad055703f058c768e7e94014952e5cd8a81c7c1515cb1
2024-03-19 15:27:15 +00:00
dan
a10c2a9055
Return the error "ambiguous column name: rowid", instead of "no such column: rowid", when a "rowid" reference is ambiguous.
...
FossilOrigin-Name: 021f34fcfed41b607be8169bbda59aef93f130108d944f4741b46e8e345b2bbb
2024-03-19 14:55:49 +00:00
drh
967c303212
Fix the fuzzinvariants.c test module so that it does not generate
...
invariants that depend on rowid when SQLITE_ALLOW_ROWID_IN_VIEW is used,
since rowid values can be unreliable in that context.
FossilOrigin-Name: 0d711aaaa14472a82f8893e1b07d845073f3d018bd5b8093ec0b00ffbbc8cd5a
2024-03-19 14:38:39 +00:00
drh
1fe31dcfab
Adjustments to the test cases for the previous check-in to make them
...
cross-platform Linux/Mac/Windows. Test chance only. No change to core code.
FossilOrigin-Name: 0dddadbd5b217a48bb5c1b0568a03fbafb89dba98c577727bf4f79ff7e0ca849
2024-03-19 10:41:18 +00:00
drh
5ed044e893
Fix another problem from [c63e26e705f5e967] involving infinities and the
...
Kahan-Babushka-Neumaier summation algorithm. Problem reported by
[forum:/forumpost/23b8688ef4|forum post 23b8688ef4].
FossilOrigin-Name: 45d272ef38d5ee6189f81369aefb8e3ac35868a67687012d93c84f2bbc42520a
2024-03-19 10:16:17 +00:00
dan
28cd72ac52
Fix asan problems in sqlite3rbu.c. Enable RBU for sanitizer release tests.
...
FossilOrigin-Name: ad2ae7717e7a10cf42aeabd3c544e7884fa082295c2babf0fdb19a684d2aba1e
2024-03-18 21:08:33 +00:00
dan
365b6e9769
Avoid spurious SQLITE_IOERR_DATA errors when reading partial pages from a cksumvfs database using a SQLITE_DIRECT_OVERFLOW_READ build.
...
FossilOrigin-Name: 0f485dbece9146eabe5a5c0998a9e35c685a170c3fe6d4509e92aa8dae18a2c0
2024-03-18 20:52:45 +00:00
drh
43a511927d
Add the "VALUES-as-coroutine" optimization. Large VALUES clauses on an
...
INSERT, for example, prepare and run in about half the time and with half
the memory. This check-in also includes enhancements to the internal
sqlite3ExprIsConstant() routine to recognize pure SQL functions as constant
if they have constant arguments.
FossilOrigin-Name: a120c9235f125e05be494038c16a9dd326fd79837698bef17e7879cd0cd75831
2024-03-18 18:00:17 +00:00
drh
c195e2374b
Allow the VALUES-as-coroutine optimization to be applied to later rows of
...
a VALUES clause even if earlier rows do not qualify.
FossilOrigin-Name: 9a47ea7f0f675f7bf4710901487ce34c7689e618cd1d8b9f94f0ff7ebc3f2841
2024-03-18 16:30:00 +00:00
drh
b03805b70b
Change a test case to use a window function rather than random() to disable
...
the VALUES clause optimization.
FossilOrigin-Name: c589149a138fa0a6be3153986fc0f315e052e13ebc0e7006b6529ca02bae413b
2024-03-18 15:10:00 +00:00
drh
27a5ee855d
Improvements to EXPLAIN QUERY PLAN output for multi-row VALUES claues.
...
FossilOrigin-Name: ac6f095e13e43d66c06552c8b01f6bec3407c9d41a34c4cdb0be57b0b828ad0d
2024-03-18 12:49:30 +00:00
dan
75924d3ae2
Ensure the database schema has been loaded and the database encoding gleaned before beginning to code a multi-row VALUES clause.
...
FossilOrigin-Name: 2ff476eb3d1f4a2146f4a48b57895a00a3ff5beb29afa679ae53ea58cac07c76
2024-03-18 11:12:22 +00:00
dan
2f4a8cc2d8
Fix a problem caused by a non-aggregate function with an OVER clause in a multi-row VALUES clause.
...
FossilOrigin-Name: 10ee6fcba08ab1281235197602148fe062560e1d5034a477b8e7b574dd3e2907
2024-03-18 10:54:48 +00:00
drh
54bf109e80
Omit the "noop(X)" test SQL function. Accomplish the same thing using
...
the idiom: "coalesce(X,random())".
FossilOrigin-Name: 0eb2fbb8910e7a372c50db3ae44238d7b161f0e45858b74061b5228aec5fcc7e
2024-03-17 16:01:23 +00:00
drh
b918a0f821
Activate the enhanced constant-expression for the
...
[constant propagation optimization](/info/f4229707ac08d66c).
FossilOrigin-Name: 92afea38881a1a4f266c79ddc6e1027cf17c288dcc8f7e7d50466899ac0054c4
2024-03-16 19:36:18 +00:00
drh
bf4105d768
Extend the scope expr-is-constant for function to cover the IN-to-EQ
...
optimization.
FossilOrigin-Name: dae669245c86021bcd28716aff6e316257cc8075d02081745d4b7de17f8ad553
2024-03-16 17:04:08 +00:00