Commit Graph

10054 Commits

Author SHA1 Message Date
drh
ea6b2a87d1 Disable test shell1-5.0 as it is causing a use of initialized deep inside
of TCL.

FossilOrigin-Name: 440bd6091e3767f0a2f42ffdc92ca5e4736c0a73324fdd15397c3b5dbbc31fb8
2026-03-02 13:43:08 +00:00
dan
33478099c9 Fix a possible 9-byte buffer overread in the zipfile extension hit when processing a corrupt zip file. Forum post [forum:/forumpost/721a05d2c5 | 721a05d2c5].
FossilOrigin-Name: 5db21813d126554d80db903be6d36ab6c1f73f9135a54af6dcfcfce0bcc18e68
2026-03-02 11:22:28 +00:00
drh
93ad2e083e The intck01.sql test should only be run if virtual tables work.
FossilOrigin-Name: 641d6f31a7f7b4901061e24d4e624da5ed92282e79771bb019b82a882e5d1ae9
2026-03-02 00:06:02 +00:00
drh
ffaf9110f6 More floating point conversion test cases.
FossilOrigin-Name: 44a736a700ab12b398873400dc06cd334817842b4fa08bf8070a9ad6dbff0b51
2026-03-01 23:23:52 +00:00
drh
7e4e866baf New floating-point test case.
FossilOrigin-Name: f353399932e9797198e635405a594c2987850070e3f9aee87a05c5a65d4c1e00
2026-03-01 23:01:17 +00:00
drh
e293b2d835 Fix an OOB read in the incremental integrity-check extension.
FossilOrigin-Name: abecc8e388e294311aa0b572e0a984b8ddad2afbf829c1246e1682fa549c8fac
2026-03-01 22:36:02 +00:00
drh
7d9fbe6476 Fix an off-by-one error in the indentation of multi-line outputs in
QRF_STYLE_Line mode.

FossilOrigin-Name: d47499b21c893cc8749a1cafe1cf712dacfeaa6cfe2cdb75d1fc450f3cb6879f
2026-02-27 13:25:42 +00:00
dan
a86c6017e7 Fix a problem where the wrong collation could be used as part of a row-value comparison between columns with different collation sequences. [forum:/forumpost/6ceca07fc3 | Forum post 6ceca07fc3].
FossilOrigin-Name: 212c68249cc0e8904fc36d8e90646d04604f2b3b9d4c32eaeac7d920fa0fba99
2026-02-26 11:03:22 +00:00
drh
b1a73ba34d Adjust the changes to shell8.test from [5da9bf09cc00faf9] so that they
work with older versions of TCL.

FossilOrigin-Name: c3b9e2cee3565da50bcc92766f700c31142391a697cbab7465774cf20a307dd8
2026-02-24 19:50:27 +00:00
drh
9d65290207 Rename SQLITE_ENABLE_MULTITHREADED_CHECKS to SQLITE_THREAD_MISUSE_WARNINGS.
Run test cases with that option. Also add the
SQLITE_THREAD_MISUSE_ABORT option.

FossilOrigin-Name: be8c8b9cb7b618a1571a988bc1cfdc15d99a8bf144d699385c0076e940b9f7f5
2026-02-24 19:37:16 +00:00
drh
d2e27e5d54 Add test cases for the symlink defenses of the previous check-in.
FossilOrigin-Name: 5da9bf09cc00faf98cc515fb5a10a0af325b8f7608893808d031dfef62380be2
2026-02-23 13:29:29 +00:00
drh
8642ca2025 New sqlite3_db_config(SQLITE_DBCONFIG_FP_DIGITS) that let's the application
specify the number of significant digits that double→text conversions
will attempt to preserve.

FossilOrigin-Name: 3f16985dcc47a366b54164c5024f920a79dddd76faeac5e36b4770732ed72c0a
2026-02-21 19:26:58 +00:00
drh
699959ff25 New test cases for floating-point conversions.
FossilOrigin-Name: 3033fe97b14ba0531278d4aa444bc5340e044b87a72b3a4341032ddee442000f
2026-02-21 13:57:40 +00:00
drh
4428aa842c Increase the precision of double → text conversions that happen in
sqlite3_column_text(), or sqlite3_value_text(), or in the CAST() operator,
or similar, so that round-tripping the value back to double results in
exactly the same value.

FossilOrigin-Name: ef0049e3ade304f64e1ab97e52e1e21379e4db461f3fa80dac8e544fb90d622f
2026-02-21 10:57:02 +00:00
drh
20c65785cd Improved rounding of floating-point conversions in some corner cases.
FossilOrigin-Name: 436dccd42650a6ab0a74459ae42fdb3e36d853f934324acc2bc961f87c001852
2026-02-20 12:27:52 +00:00
drh
8c3e8dce41 Increase the number of floating-point precision test cases by 9x, and
increase the require precision to 16 digits.

FossilOrigin-Name: 62c2cf74db5e47f975d1f47818f82f060ddecad4b68c4d4dbc6190cc9a8fc397
2026-02-17 14:02:27 +00:00
dan
1105c33900 Fix another case where SQLite might fail to identify an ON clause on a RIGHT or FULL join that refers to FROM-clause elements to its right.
FossilOrigin-Name: e956b36063e77b5ad0d8b8afb5dc942665f570d762929ff277e320c06ded8ce6
2026-02-16 16:56:25 +00:00
dan
7b93f1a387 Fix a problem with identifying ON clauses attached to RIGHT or FULL JOINs (which is an error) if the join appeared in a flattened sub-query.
FossilOrigin-Name: cf2dc6dfad275dad8fef763a57baaaf6301b0d3bf1916be90f22200cbe0115d0
2026-02-16 11:59:14 +00:00
drh
1f9ae1f780 Immediately reset all pending prepared statements on any call to
sqlite3_set_authorizer(), even if the authorizer is being disabled.

FossilOrigin-Name: 5c0468acd1a12f7fd01b9974250fb42c5811939dc2319729a1ef93c073dc0071
2026-02-09 19:58:04 +00:00
dan
612bee531f Do not allow table-function argument expressions on the RHS of an OUTER join to refer to FROM clause elements to their right.
FossilOrigin-Name: 021e48e28931afd781e76db6293e60fd2ffb8377cb1051e8b802f2743a10fa5d
2026-02-09 14:45:17 +00:00
drh
450a90097f Do a better job of not generating unnecessary Bloom filters associated
with IN operators.

FossilOrigin-Name: 3861df5c127f82becea80c48c547de8ed0d01eebcf6a6a9d7f234dde31f50394
2026-02-05 21:14:34 +00:00
drh
761118497a Improve the query planner by reducing the estimated number of output rows
for each stage of a join if there are LIKE, GLOB, REGEXP, or MATCH
constraints on the table where the pattern string is a constant.  The
reduction in the output row estimate is proportional to the length of
the pattern string.

FossilOrigin-Name: 6852843e6aa23051de0884593ce64b96a16f16c4d63b222bd324297581f7cf75
2026-02-03 17:21:59 +00:00
drh
e54142009c Minor change to test/dotcmd01.test so that it works with STAT4.
FossilOrigin-Name: 8aaf5b6b6c3d71789eebd2b8f440dd2fdaad2ef2adc9c7b2b019f08853d0b195
2026-02-03 17:07:28 +00:00
drh
77c5456d7f Do not reduce the estimated truth probability of LIKE and GLOB operators
by quite so much.  Fix a single test case whose output changed.

FossilOrigin-Name: fdebbedbd9a99165359761106cdc76d327f74043b22806b7bd96402fbed36f14
2026-02-02 16:03:24 +00:00
drh
213262fa53 Enhance the ".timer" command in the CLI to accept the "once" argument, and
so that it leaves its last real-time result in the $TIMER variable.  Also
fix a harmless warning from an earlier check-in.

FossilOrigin-Name: 8ad7dffc261cbb3f7c9b4d38b04282c805c1c047fb431076f85e577c81f21574
2026-02-01 15:58:37 +00:00
drh
1d8eb1d9b6 Fix a missed optimization opportunity due to a typo in check-in [898bfa1afd8260ea].
Reported by [forum:/forumpost/2026-01-31T00:49:53z|forum post 2026-01-31T00:49:53z].

FossilOrigin-Name: 3a4f9a323da90611d7eda51b90cb058175ddde0a128e1ff00ce58cc83af0f376
2026-01-31 02:17:55 +00:00
drh
4fd4e8f066 Make CROSS JOIN a join reorder barrier again, as the SQLite documentation says it is. It
mistakenly stopped being a join barrier with check-in [c1ea064948ba08c4].

FossilOrigin-Name: d294106ecb78d765305ab740007f4a678e28baa13ae403fe57ea9cbfc259620f
2026-01-30 17:10:22 +00:00
drh
c79b1f7d6c Fix the new CLI so that the ".eqp" setting does not affect the output of other dot
commands such as .schema or .tables.

FossilOrigin-Name: a5a1b69b3feedb507ecfe2e9ddc039d7c01e1bb54e3e881df5010481886cdef9
2026-01-30 16:03:22 +00:00
drh
4b4df2ee1e Change the new escape-character mechanism for CSV import so that there are
separate options for an escape character for quoted and unquoted fields of
the CSV.

FossilOrigin-Name: 293ec20e29e46d822a98302f8a0ba52ad6f74a7e93f780536d393730c2edbf61
2026-01-30 13:11:20 +00:00
drh
1d1cd36428 Undo the previous check-in. In its place, add the --escape option to
the ".import" command.

FossilOrigin-Name: f11a05d52a1eb933f394d48c0d4ee0353f07ad725b7378c40afd01632e67f72d
2026-01-30 12:27:13 +00:00
drh
a5cc01681e Enhance the CSV import capability in the CLI so that it understands
backslash-escaped double-quotes.

FossilOrigin-Name: 7ba0594d3c24531bc014dd029093b0503118a29cfdd13af2a2ebdd456855ce94
2026-01-30 12:15:25 +00:00
drh
60229c2971 Avoid unsigned integer overflow when evaluating an array index in a
JSON path expression.
[forum:/forumpost/2026-01-27T14:18:49z|Forum post 2026-01-27T14:18:49z].

FossilOrigin-Name: 631c8d44cd1624ddc45babd3f0d810908c2a368784744262042c63506ff2e333
2026-01-27 23:33:42 +00:00
drh
b4142c491e For CSV import in the CLI, when the table is created automatically
because it does not previously exist, make the column types "ANY"
instead of "TEXT" so that they will automatically adjust to different
datatypes in the input text.

FossilOrigin-Name: aff74e71ea734e1ad8fa893652885fd8c6c432fb60e92913a799e6df5e980b47
2026-01-27 14:59:08 +00:00
dan
8f03e92c41 Add test for fts3 compress= and uncompress= options.
FossilOrigin-Name: bace9de67db426017d98f31685da1fc6ab10c7755681a41ca978cc97cb2ad5df
2026-01-26 20:17:10 +00:00
drh
49bf78685e Add alternative sqlite3_carray_bind_v2() interface.
FossilOrigin-Name: 925384d7711867428644595c0903682e6e365eb974c57e6680b51d511c980054
2026-01-26 13:44:42 +00:00
drh
9b7005feea Always use the sort-and-merge algorithm for EXCEPT, INTERSECT, and UNION,
even if there is no ORDER BY clause.

FossilOrigin-Name: 132ba781b031972c6ac564ff0d1d6b2dfaeee77fe503ad6e9e8647bb5ba28bd3
2026-01-25 23:28:42 +00:00
drh
8e272dd9a7 Fix the jsonb_group_array() and jsonb_group_object() functions so that they return
JSONB as they should, and not text JSON, when the array or object is empty.
[forum:/forumpost/2026-01-25T00:47:06z|Forum post 2026-01-25T00:47:06z].

FossilOrigin-Name: 8b53b97833afe27c0c3782c5fbc0437976215b571579f73a94c33e28d3fedb41
2026-01-25 15:18:31 +00:00
drh
e4445f04c5 In the cost metrics of the query planner, the estimated number of output rows
from an EXISTS-to-JOIN loop should not be more than 1.
[forum:/forumpost/989880d0aa|Forum post 989880d0aa].

FossilOrigin-Name: fc4e93a381dfb99dddfd2ef001bf56b92ab89ee3c7044c7ce13ad32f38b3f418
2026-01-23 20:46:54 +00:00
drh
e66806de33 Fix another test case to work with union-by-merge.
FossilOrigin-Name: 8279c10e2465838010508f6018aa6fdb0e07ca3639f65e727a03a4222573ea57
2026-01-20 18:20:26 +00:00
drh
ec13fcecd2 Minor fixes. Tests are passing now.
FossilOrigin-Name: 305ae331f5e791941c12b04b727656ac8d80f7c5cb6343277b979a456eb3b834
2026-01-20 15:07:28 +00:00
drh
4720c16223 Raise an error if any PATH argument to json_array_insert() is not the path
of an array element.  Add some test cases for json_array_insert().

FossilOrigin-Name: 96b7d2c60a3f8a9f9d69313bad599a3a5ad335cb382263e4254e2d20929d5e55
2026-01-17 19:01:37 +00:00
drh
9dff6ac96e Try to prevent false positives in fuzzinvariants.c due to scalar subqueries.
FossilOrigin-Name: c20be882a62e75abc50fd2dcae26ebbe83a01f09369525392fa22223627a04ea
2026-01-16 17:48:46 +00:00
drh
4dd1a202de The optimization at [8bdda827a3d26800] is incorrect for the case where one
of the two expressions has been commuted such that the collating sequence
has changed.  This check-in fixes the problem.  Problem reported by
[forum:/forumpost/2026-01-16T11:35:28Z|forum post 2026-01-16T11:35:28Z].

FossilOrigin-Name: 9d8fb7a9e23d5ef76d05824401976247debe51be6f658f132609257a068a73de
2026-01-16 15:53:20 +00:00
drh
43eb1d4d22 Adjust the output of the fuzzcheck test program so that testrunner.tcl can
capture the number of tests run even when the --slice option is used.

FossilOrigin-Name: dddaeff4ce552f3aa57cc6e18ed35051138b591338242df5f3af39e24006a834
2026-01-14 19:22:36 +00:00
drh
e5fba7f094 Guard against oversized index entries in databases larger than 2GiB.
FossilOrigin-Name: ed17a878e5a2e0cd1e9b69d528f5ac2ba8452d7c83deaf3cc72ecbff054f5ca3
2026-01-14 13:43:32 +00:00
drh
35b9709d46 Fix integer overflow problems and error reporting memory leaks in
the zipfile extension.
[forum:/forumpost/2026-01-13T00:09:06Z|Forum post 2026-01-13T00:09:06Z].

FossilOrigin-Name: 8e656a483557bc5385219d560b9155c232e7dc9d62642249abc879fb37bacd2a
2026-01-13 02:35:19 +00:00
stephan
2f47a58c5d Update speedtest.md to point out xdg-open on Linux.
FossilOrigin-Name: 47c7fbcb46df5a657ec76dff9a370aea9e7d0d95406b1e124e9fe527cf85350d
2026-01-10 14:12:40 +00:00
stephan
644c42f3a4 Fix a help text typo in speedtest1.tcl, pointed out off-list by BrickViking.
FossilOrigin-Name: 1fd02a75a914f131948fe06fc99f851d3e226f9f1270e25393d79c493c28a347
2026-01-10 00:38:00 +00:00
drh
03c0ac435e Enhance QRF so that it terminates more quickly if it encounters an OOM
or oversize string error, and fix it so that it reports such errors.

FossilOrigin-Name: ebedeb6169cc3bc3708130d4061065af600a8851e896fc3eeaf33c8c83fe3b95
2026-01-07 16:19:18 +00:00
dan
55f258bd27 Update the regexp extension so that the "-" character may be escaped with a backslash. Forum post [forum:c5e7358f82 | c5e7358f82].
FossilOrigin-Name: 80013129361fb81ce5db1f6390cad640c2cb547e5ba16724dfb55d0aceecdf6d
2026-01-05 18:29:07 +00:00