31731 Commits

Author SHA1 Message Date
stephan
6af10b0efd Refactor the uint128 type check to consolidate duplicated rules.
FossilOrigin-Name: 362ef7bc00eea180fb3458bd8887021aed54e321901483edc00ad6b23a33d8e5
2026-04-27 06:48:07 +00:00
stephan
70d1e3e75e Feature detection fix for uint128 on RISCV 32-bit, reported in [forum:f8d1417ce8eb2f22|forum post 2026-04-26T11:41:01Z] and validated by the OP.
FossilOrigin-Name: c4a2c20839ef75534d71d928a03ad276bdc488b0baa76c1505f48dc1ff0bcdd1
2026-04-27 05:55:38 +00:00
drh
74006fdcdb Improvements to temp-file cleanup on close in the CLI.
FossilOrigin-Name: 048c969c34eaaf8c203b996e999a7dbc94c47b4959719af9e6625052520f7135
2026-04-26 18:35:26 +00:00
drh
4b9f9d6794 In the CLI, eliminate the 2-second delay before getting the prompt back
after running a ".www" or ".excel".  Instead, remember the name of the
temporary file that is to be deleted and delete it later.

FossilOrigin-Name: 4e9ee211ca661fe8978b7f676f33ef962ff5c8177bc7c5ad42b19a2fa4482d90
2026-04-25 16:17:23 +00:00
drh
39b2fe7e5b Simplify the modePush()/modePop() implementation in the CLI.
FossilOrigin-Name: 92cad2cd7284d3a969b713336865007da2b0b2a8eef367d4185802174cbd027a
2026-04-25 15:05:46 +00:00
dan
01ec60bb87 Do not run expridx2.test as part of the "journaltest" permutation, as it requires wal mode.
FossilOrigin-Name: 11cfbae735669776c967522294b1606af90b4bd5379e2e1ed722520887b57757
2026-04-25 14:32:05 +00:00
dan
e2dbd0a578 Fix a single-byte OOB read that could occur in the session module when concatenating patchsets.
FossilOrigin-Name: 60d7cd625a6160ba1bc60fd00fab2e91e0deff42034c6864107c19330b35ea7a
2026-04-25 14:00:29 +00:00
drh
df7b22790e Minor code simplification in the CLI.
FossilOrigin-Name: 59795c71e5745e8a27dc596b9f1fc8f137df58a6ec8d8d0dab2b31cf8562796d
2026-04-25 10:45:17 +00:00
drh
50811f74e0 Fix a problem in the CLI in which the ".www" command followed by
".dbstat" does not restore the mode to its original setting afterwards.

FossilOrigin-Name: 4a5cac1d00e1fa287ab8ce3437c0152a9f362d72bdb9976889c93f6368b3fd66
2026-04-25 00:29:40 +00:00
drh
d7bf8233ff Fix test cases due to recent CLI default prompt changes. Make sure ANSI
escape codes are recognized on Windows terminals.

FossilOrigin-Name: 22b791e404f0895b0f343b2ce0e169a7ada8578e46a39a9f4bd3a31f81c9853c
2026-04-24 20:27:42 +00:00
drh
455486bbc4 Improvements to the default prompt for the CLI.
FossilOrigin-Name: 9ab0bb487f78ba5a51cd3b4efcee23b11096e90ebf3add4da18aea657e8de0b6
2026-04-24 09:21:25 +00:00
drh
ba9092e228 Improved default prompt in the CLI.
FossilOrigin-Name: 78193b60346dba304485241dd65f0eb6e971714397b76191b3bf7a5fdb44916b
2026-04-23 22:15:18 +00:00
drh
67d4e0226f Fix harmless compiler warnings. Enhance the CLI prompt mechanism to make
it more easily reusable by other projects, and to add the /h, /H, and /u
escape sequences.

FossilOrigin-Name: 354ce4f5e2a86b621b2058a6372495a5919cf3dc88ce1ed3637642f720c48002
2026-04-23 20:13:14 +00:00
drh
323b3fc121 Fix a bug in [dbc1d6f0a3452607] that disrupts the display when running
on a Windows console (not redirecting to a file).

FossilOrigin-Name: 75b5df2b0046827e985712b5725488b59667e2cfd171cde9f1194f2917165205
2026-04-23 20:06:16 +00:00
drh
78279e2550 Improvements to the #define mechanism in the CLI that allows other programs
that incorporate the shell.c source file to customize some of the
prompt expansions.

FossilOrigin-Name: e5f8840d11c1863cfc5c0b4a3d16c9ec9ab6ca6ecb7ff1a3a9a237715eed5d30
2026-04-23 16:40:34 +00:00
dan
4e4962f6b3 Have testrunner.tcl return a non-zero exit status if one or more tests have failed.
FossilOrigin-Name: 50ddc36d32540b6d98990b5c9a465beb5b68cc31ae3f0ed162f6fe07e7c74e2d
2026-04-23 15:54:00 +00:00
drh
ed95a9d103 New CLI prompt escape sequences: /r, /A, /v, /V, and /D../D.
FossilOrigin-Name: e7c7acd1a4e5cb0f8e68f119352480c1aa9dd3c2b289c92f88e9e697a2e440e0
2026-04-23 15:05:46 +00:00
drh
e791e7c7a0 Fix harmless compiler warning.
FossilOrigin-Name: 706373dcbe43752cf21604f278f96fb3015a36089ad64f069bb3a64bc526d137
2026-04-23 14:49:21 +00:00
stephan
2545d9c201 CLI shell: handle the special case of .prompt "" to not incorrectly report that as an OOM. Reported [https://fossil-scm.org/forum/forumpost/ca277be73a|in the Fossil SCM forum].
FossilOrigin-Name: 3fa0500b964869c45f7b49717680b791049f7cd8c47a06a337dd22351d2002f9
2026-04-23 14:05:36 +00:00
dan
2a07c6de2c When updating indexes on expressions, omit the update if the new indexed values are the same as the old.
FossilOrigin-Name: f0fc4e5ec334da3a1db8b0334e23d1911874c96675690da94210b2afb45f7307
2026-04-22 19:38:04 +00:00
dan
68b07ddd41 Add OOM test for the new code on this branch.
FossilOrigin-Name: 685be705a2a69e79de0d581e5bbe9d942133817342121786a551d95d59a4af6c
2026-04-22 19:25:12 +00:00
drh
4b69e7704b Mark branches that are believed to be unreachable.
FossilOrigin-Name: 18ed9736fbbea762e04b8ad156e83e577e60c5234a5e233540ad8664fe3b379c
2026-04-22 19:12:48 +00:00
dan
e17ab401f0 Instead of adding a branch to OP_IdxInsert, use an extra OP_IfNull when updating indexes on expressions.
FossilOrigin-Name: 5112f96cb1428693614b91bcca78326fccf7289e395a920339676ceeba871e3f
2026-04-22 18:19:24 +00:00
dan
57ee077c5e Enable the optimization on this branch for indexes on expressions only.
FossilOrigin-Name: 3576b6930436b3149c5033476f70518e9b4adeaeec2538a68b7dc599eb854c47
2026-04-22 17:50:50 +00:00
dan
c7edd22456 Fix P3/P5 confusion in the comment above OP_IdxDelete.
FossilOrigin-Name: 0fb6ca8e22f355838a02223dd24b34c0669a6cc0b7ac80931c721db72cf5c1c8
2026-04-22 17:31:19 +00:00
dan
8606a52934 Detect and omit cases where an index key is being replaced with an identical key.
FossilOrigin-Name: 7a01caf0d0864a462eb81b7643dcf89048f4ae56a29d762f0cfc38066218504f
2026-04-22 16:58:36 +00:00
drh
5c6404aa77 Fix a integer type bug in the previous check-in.
FossilOrigin-Name: 5e1b5ff1c170e94956bf77bd38afcad6369cb9f9333864711212af045281ad0e
2026-04-22 13:41:20 +00:00
drh
429369f4aa QRF and the CLI preserve zero bytes when outputing unformatted BLOB values.
FossilOrigin-Name: dbc1d6f0a3452607e4e92155df0fdb1c5ea4ea5ad1654664f86383faf6c105ef
2026-04-22 12:22:32 +00:00
drh
9529894a29 Fix harmless compiler warning in QRF.
FossilOrigin-Name: dcfb505ac7762f7a3102e1c3853a83dca1d1ef436cc8981949b63c7d7992cc5b
2026-04-21 22:19:38 +00:00
dan
c4c47a49a8 Disable optimization of nested EXIST loops. Possible fix for [forum:/forumpost/077c02e8ed | forum post 77c02e8ed].
FossilOrigin-Name: d0d95a39bc211034071746395ee6dbcfbea9d573d27480655391ba9698f7e214
2026-04-21 20:40:22 +00:00
drh
ee7f6f29fc Fix the BETWEEN operator so that it propagates the EP_Subquery,
EP_Collate, and EP_HasFunc flags in the expression tree, as it ought.
Fix for the problem reported at
[forum:/forumpost/2026-04-21T19:10:55Z|forum post 2026-04-21T19:10:55Z]
and probably a bunch of other problems too.  This has been incorrect
for a long time.

FossilOrigin-Name: 2d1d2947b28f5dcbf4c66b594e176038c4e71e61948a88db565c1cb1212657ce
2026-04-21 20:28:38 +00:00
dan
c3b52dff53 Correctly dequote the constraint name passed to ALTER TABLE DROP CONSTRAINT. This improves upon the partial fix in [7f5afb12f4]. Forum post [forum:/forumpost/a746b08b87 | a746b08b87].
FossilOrigin-Name: 9387238cb0bb2651c64ecb229072df039577d71fd91546a2f0c94ca9755bf25d
2026-04-21 18:07:04 +00:00
dan
30af54043e Disable optimization of nested EXIST loops. Possible fix for [forum:/forumpost/077c02e8ed | forum post 77c02e8ed].
FossilOrigin-Name: 64f0d9eb63a351de12bb9643f1f6390a89f6d95dc81c07f1dc409ee31bae6f83
2026-04-21 16:40:08 +00:00
drh
4ebed2a4e5 Fix an off-by-one buffer size calculation in the decimal.c extension.
FossilOrigin-Name: 24df42104d5fd1cf974f2bf539fa7515808e21e68d64899c39f5fcf3bee49a48
2026-04-21 16:07:15 +00:00
drh
532ed30ab2 Do not unnecessarily delay opening the database file in the CLI.
FossilOrigin-Name: ab6ee76c1266b753d0749c63890f40db875536ceb4dd3252cc7a3386e386a0c1
2026-04-21 14:39:23 +00:00
drh
5e99eeb3d8 Fix another bug in [/info/e33da6d5dc964db8|EXISTS-to-JOIN] - this one
having to do with an OFFSET clause of a LIMIT.  Reported by
[forum:/forumpost/2026-04-21T10:57:09Z|forum post 2026-04-21T10:57:09Z].

FossilOrigin-Name: 1dd3c6a5e50ac3f617683678223e42f48636c17e58905506c5c74cc4bf05845c
2026-04-21 12:59:43 +00:00
stephan
d3abfd77f5 Reformulate how the OPFS async proxy Worker is loaded for the bundler-friendly builds to work around a bug in Vite in which it incompatibly rewrites the Worker's URL arguments. Addresses the discussion at [https://github.com/sqlite/sqlite-wasm/pull/159|npm package PR 159] and patch validated by Jure Rotar.
FossilOrigin-Name: ec877a30f5c5db30b9154745140744c5cc80d89673d79e50901d7377599cf2b4
2026-04-21 10:19:38 +00:00
drh
63984b6ab7 Fix the fileio extension for Windows builds so that it does not depend on
the sqlite3_win32_utf8_to_unicode() and sqlite3_win32_unicode_to_utf()
routines that are found in the SQLite core.
[forum:/forumpost/2026-04-20T02:02:56Z|Forum post 2026-04-20T02:02:56Z].

FossilOrigin-Name: fe0414a9a3caf6af67f53a5f3534efd5d4bf4978ebce1c591ef62d6961e55701
2026-04-20 10:28:19 +00:00
drh
93082e5589 Fix a harmless compiler warning in test/speedtest1.c.
FossilOrigin-Name: 13f0fd1daaf787bff6eded4a01c2cf47c79e52cf8812bb344995e28c015a4ed1
2026-04-18 21:51:32 +00:00
drh
f6b807a022 Performance improvement in the substr() and length() SQL functions.
Caution: The new code may give different results for malformed UTF8.
I do not consider that to be a problem by the GI/GO principle.

FossilOrigin-Name: 6124d27a33f4562f40777c2c6318d61709f7b481f23f9ade45064d8ad0700752
2026-04-18 12:31:53 +00:00
drh
8c6a6b85db Fix a test case that started failing due to a change in the help text
for the ".prompt" command of the CLI.

FossilOrigin-Name: bfe9df1bf4660ce6bdfd11a4f06d32694c93750c7bc0a6432459d9f1089eace4
2026-04-17 19:12:27 +00:00
dan
9f76fb019e Update interrupt2.test to avoid using Tcl_GetCommandInfo() from within calls to Tcl_DeleteCommand().
FossilOrigin-Name: 1979aa0902a43f20d4e396c5f9b9a49aaf0094d8520bf53ce058bb379a7720ab
2026-04-17 15:09:50 +00:00
drh
29997b4731 Help-text and comment fixes in the CLI. Add the output-redir-test.txt
testing script.

FossilOrigin-Name: ec58a133b4716d4f5a53c38853f8ecdb7a1275b931663ce07c8dc700d845e62e
2026-04-17 11:41:33 +00:00
drh
f0c8e27670 Less error-prone parsing of ".once" options. Fix for the problem reported
by [forum:/info/2026-04-17T01:26:56Z|forum post 2026-04-17T01:26:56Z].

FossilOrigin-Name: b235a8093734f457c2731af017c99027510d04e5cd1060f5559afbec5409a472
2026-04-17 01:50:40 +00:00
drh
d6c985ad0b Fix testrunner.tcl so that it does not create directories with names
ending in "sqlite3.o" or "sqlite3.lo".  Use "sqlite3obj" for those
directory names instead.  Otherwise "make clean" gets confused.

FossilOrigin-Name: a4bf9289c9cdb12b22bfb24e7e2b0243384e9edece12ae3fed14afbfe9b93260
2026-04-16 19:50:52 +00:00
drh
1696740fdc Improved comments explaining the logic, and improved diagnostic messages
when testrunner.tcl encounters trouble loading the sqlite3 extension.

FossilOrigin-Name: 8d820b0ccfccff94ed5b7297fa587ac27a74e990f233cfe229da7409ab2e3af8
2026-04-16 19:33:04 +00:00
drh
2cefd5954a Minor updates to testrunner documentation.
FossilOrigin-Name: f8507bd5e221783175be2bb7b907c098e0970b1cbcb01817df7217005eab9ab4
2026-04-16 17:07:23 +00:00
dan
8895c50403 Run C-language tests in tests/c/ as part of release test.
FossilOrigin-Name: e6929022b71c6bff7aa9cfbdb8a5e80499ca856b8c06d4211c55311b48704a08
2026-04-16 16:43:32 +00:00
drh
a2116f86b0 The sqlite3_str_new() interface never returns NULL, even after an OOM.
Code that uses that interface should invoke sqlite3_str_errcode() to see
if an OOM has occurred.

FossilOrigin-Name: cb910047edc591102dd4ed0d57c863b366981b8aa1d3085d5f95b1fbbabf6c31
2026-04-15 14:41:25 +00:00
drh
1e472f2d32 Bug fix in sqlite3_str_free(): Do not crash if called on an sqlite3_str
object returned from sqlite3_str_new() following an OOM.

FossilOrigin-Name: 92d8ac0c4938e43b00111b43630ecfa91c30e5200ca03937a84f4b50bd1a13b3
2026-04-15 14:17:58 +00:00