]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
6 days agoMerge recent trunk enhancements into the begin-concurrent branch. begin-concurrent
drh [Wed, 22 Apr 2026 19:50:38 +0000 (19:50 +0000)] 
Merge recent trunk enhancements into the begin-concurrent branch.

FossilOrigin-Name: 7f954a9e2fa4203b55825dfd70a46ffde7c985a4c8b940208d74d97441f3fd04

6 days agoWhen updating indexes on expressions, omit the update if the new indexed values are...
dan [Wed, 22 Apr 2026 19:38:04 +0000 (19:38 +0000)] 
When updating indexes on expressions, omit the update if the new indexed values are the same as the old.

FossilOrigin-Name: f0fc4e5ec334da3a1db8b0334e23d1911874c96675690da94210b2afb45f7307

6 days agoAdd OOM test for the new code on this branch. index-detect-noop
dan [Wed, 22 Apr 2026 19:25:12 +0000 (19:25 +0000)] 
Add OOM test for the new code on this branch.

FossilOrigin-Name: 685be705a2a69e79de0d581e5bbe9d942133817342121786a551d95d59a4af6c

6 days agoMark branches that are believed to be unreachable.
drh [Wed, 22 Apr 2026 19:12:48 +0000 (19:12 +0000)] 
Mark branches that are believed to be unreachable.

FossilOrigin-Name: 18ed9736fbbea762e04b8ad156e83e577e60c5234a5e233540ad8664fe3b379c

6 days agoInstead of adding a branch to OP_IdxInsert, use an extra OP_IfNull when updating...
dan [Wed, 22 Apr 2026 18:19:24 +0000 (18:19 +0000)] 
Instead of adding a branch to OP_IdxInsert, use an extra OP_IfNull when updating indexes on expressions.

FossilOrigin-Name: 5112f96cb1428693614b91bcca78326fccf7289e395a920339676ceeba871e3f

6 days agoEnable the optimization on this branch for indexes on expressions only.
dan [Wed, 22 Apr 2026 17:50:50 +0000 (17:50 +0000)] 
Enable the optimization on this branch for indexes on expressions only.

FossilOrigin-Name: 3576b6930436b3149c5033476f70518e9b4adeaeec2538a68b7dc599eb854c47

6 days agoFix P3/P5 confusion in the comment above OP_IdxDelete.
dan [Wed, 22 Apr 2026 17:31:19 +0000 (17:31 +0000)] 
Fix P3/P5 confusion in the comment above OP_IdxDelete.

FossilOrigin-Name: 0fb6ca8e22f355838a02223dd24b34c0669a6cc0b7ac80931c721db72cf5c1c8

6 days agoDetect and omit cases where an index key is being replaced with an identical key.
dan [Wed, 22 Apr 2026 16:58:36 +0000 (16:58 +0000)] 
Detect and omit cases where an index key is being replaced with an identical key.

FossilOrigin-Name: 7a01caf0d0864a462eb81b7643dcf89048f4ae56a29d762f0cfc38066218504f

6 days agoFix a integer type bug in the previous check-in.
drh [Wed, 22 Apr 2026 13:41:20 +0000 (13:41 +0000)] 
Fix a integer type bug in the previous check-in.

FossilOrigin-Name: 5e1b5ff1c170e94956bf77bd38afcad6369cb9f9333864711212af045281ad0e

6 days agoQRF and the CLI preserve zero bytes when outputing unformatted BLOB values.
drh [Wed, 22 Apr 2026 12:22:32 +0000 (12:22 +0000)] 
QRF and the CLI preserve zero bytes when outputing unformatted BLOB values.

FossilOrigin-Name: dbc1d6f0a3452607e4e92155df0fdb1c5ea4ea5ad1654664f86383faf6c105ef

6 days agoFix harmless compiler warning in QRF.
drh [Tue, 21 Apr 2026 22:19:38 +0000 (22:19 +0000)] 
Fix harmless compiler warning in QRF.

FossilOrigin-Name: dcfb505ac7762f7a3102e1c3853a83dca1d1ef436cc8981949b63c7d7992cc5b

6 days agoDisable optimization of nested EXIST loops. Possible fix for [forum:/forumpost/077c02...
dan [Tue, 21 Apr 2026 20:40:22 +0000 (20:40 +0000)] 
Disable optimization of nested EXIST loops. Possible fix for [forum:/forumpost/077c02e8ed | forum post 77c02e8ed].

FossilOrigin-Name: d0d95a39bc211034071746395ee6dbcfbea9d573d27480655391ba9698f7e214

6 days agoFix the BETWEEN operator so that it propagates the EP_Subquery,
drh [Tue, 21 Apr 2026 20:28:38 +0000 (20:28 +0000)] 
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

7 days agoCorrectly dequote the constraint name passed to ALTER TABLE DROP CONSTRAINT. This...
dan [Tue, 21 Apr 2026 18:07:04 +0000 (18:07 +0000)] 
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

7 days agoDisable optimization of nested EXIST loops. Possible fix for [forum:/forumpost/077c02... disable-nested-exist-opt
dan [Tue, 21 Apr 2026 16:40:08 +0000 (16:40 +0000)] 
Disable optimization of nested EXIST loops. Possible fix for [forum:/forumpost/077c02e8ed | forum post 77c02e8ed].

FossilOrigin-Name: 64f0d9eb63a351de12bb9643f1f6390a89f6d95dc81c07f1dc409ee31bae6f83

7 days agoFix an off-by-one buffer size calculation in the decimal.c extension.
drh [Tue, 21 Apr 2026 16:07:15 +0000 (16:07 +0000)] 
Fix an off-by-one buffer size calculation in the decimal.c extension.

FossilOrigin-Name: 24df42104d5fd1cf974f2bf539fa7515808e21e68d64899c39f5fcf3bee49a48

7 days agoDo not unnecessarily delay opening the database file in the CLI.
drh [Tue, 21 Apr 2026 14:39:23 +0000 (14:39 +0000)] 
Do not unnecessarily delay opening the database file in the CLI.

FossilOrigin-Name: ab6ee76c1266b753d0749c63890f40db875536ceb4dd3252cc7a3386e386a0c1

7 days agoFix another bug in [/info/e33da6d5dc964db8|EXISTS-to-JOIN] - this one
drh [Tue, 21 Apr 2026 12:59:43 +0000 (12:59 +0000)] 
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

7 days agoReformulate how the OPFS async proxy Worker is loaded for the bundler-friendly builds...
stephan [Tue, 21 Apr 2026 10:19:38 +0000 (10:19 +0000)] 
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

8 days agoFix the fileio extension for Windows builds so that it does not depend on
drh [Mon, 20 Apr 2026 10:28:19 +0000 (10:28 +0000)] 
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

9 days agoFix a harmless compiler warning in test/speedtest1.c.
drh [Sat, 18 Apr 2026 21:51:32 +0000 (21:51 +0000)] 
Fix a harmless compiler warning in test/speedtest1.c.

FossilOrigin-Name: 13f0fd1daaf787bff6eded4a01c2cf47c79e52cf8812bb344995e28c015a4ed1

10 days agoPerformance improvement in the substr() and length() SQL functions.
drh [Sat, 18 Apr 2026 12:31:53 +0000 (12:31 +0000)] 
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

11 days agoFix a test case that started failing due to a change in the help text
drh [Fri, 17 Apr 2026 19:12:27 +0000 (19:12 +0000)] 
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

11 days agoUpdate interrupt2.test to avoid using Tcl_GetCommandInfo() from within calls to Tcl_D...
dan [Fri, 17 Apr 2026 15:09:50 +0000 (15:09 +0000)] 
Update interrupt2.test to avoid using Tcl_GetCommandInfo() from within calls to Tcl_DeleteCommand().

FossilOrigin-Name: 1979aa0902a43f20d4e396c5f9b9a49aaf0094d8520bf53ce058bb379a7720ab

11 days agoHelp-text and comment fixes in the CLI. Add the output-redir-test.txt
drh [Fri, 17 Apr 2026 11:41:33 +0000 (11:41 +0000)] 
Help-text and comment fixes in the CLI.  Add the output-redir-test.txt
testing script.

FossilOrigin-Name: ec58a133b4716d4f5a53c38853f8ecdb7a1275b931663ce07c8dc700d845e62e

11 days agoLess error-prone parsing of ".once" options. Fix for the problem reported
drh [Fri, 17 Apr 2026 01:50:40 +0000 (01:50 +0000)] 
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

12 days agoFix testrunner.tcl so that it does not create directories with names
drh [Thu, 16 Apr 2026 19:50:52 +0000 (19:50 +0000)] 
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

12 days agoImproved comments explaining the logic, and improved diagnostic messages
drh [Thu, 16 Apr 2026 19:33:04 +0000 (19:33 +0000)] 
Improved comments explaining the logic, and improved diagnostic messages
when testrunner.tcl encounters trouble loading the sqlite3 extension.

FossilOrigin-Name: 8d820b0ccfccff94ed5b7297fa587ac27a74e990f233cfe229da7409ab2e3af8

12 days agoMinor updates to testrunner documentation.
drh [Thu, 16 Apr 2026 17:07:23 +0000 (17:07 +0000)] 
Minor updates to testrunner documentation.

FossilOrigin-Name: f8507bd5e221783175be2bb7b907c098e0970b1cbcb01817df7217005eab9ab4

12 days agoRun C-language tests in tests/c/ as part of release test.
dan [Thu, 16 Apr 2026 16:43:32 +0000 (16:43 +0000)] 
Run C-language tests in tests/c/ as part of release test.

FossilOrigin-Name: e6929022b71c6bff7aa9cfbdb8a5e80499ca856b8c06d4211c55311b48704a08

13 days agoThe sqlite3_str_new() interface never returns NULL, even after an OOM.
drh [Wed, 15 Apr 2026 14:41:25 +0000 (14:41 +0000)] 
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

13 days agoBug fix in sqlite3_str_free(): Do not crash if called on an sqlite3_str
drh [Wed, 15 Apr 2026 14:17:58 +0000 (14:17 +0000)] 
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

13 days agoAdd support for the analyze() extension function to the fuzzcheck test
drh [Wed, 15 Apr 2026 13:05:43 +0000 (13:05 +0000)] 
Add support for the analyze() extension function to the fuzzcheck test
program.

FossilOrigin-Name: abd94554d24122f0e0c3b7b36e5846e8c7aa0dddbddd9aae35b3f6ae6ab283c0

13 days agoImprove the analyze() extension so that it returns a simple error message
drh [Wed, 15 Apr 2026 12:47:37 +0000 (12:47 +0000)] 
Improve the analyze() extension so that it returns a simple error message
as text (it does not throw an error) if the database is empty or is "temp"
or does not exist.

FossilOrigin-Name: 35379f60922f14d4f6d231ae627df066ad4e4510208bcc244505b9afb279f2fa

13 days agoFix harmless compiler warnings seen by MSVC in the previous check-in.
drh [Wed, 15 Apr 2026 12:35:23 +0000 (12:35 +0000)] 
Fix harmless compiler warnings seen by MSVC in the previous check-in.
Also add ext/misc/analyze.c to the makefile dependencies for the CLI.

FossilOrigin-Name: 5a0ee6e227042e41ac64869c75f961798b252458670c18662175fe5bfa8b87d3

13 days agoAdd the analyze() SQL function implemented the ext/misc/analyze.c extension
drh [Wed, 15 Apr 2026 12:20:11 +0000 (12:20 +0000)] 
Add the analyze() SQL function implemented the ext/misc/analyze.c extension
(but not part of the amalgamation).  Make that function available in the
CLI and add a new ".dbinfo" command to the CLI using that function.

FossilOrigin-Name: 4c4988e56df3c668b8891e2a55887a6618f5b84e9111e562b93059ddb9a662dc

13 days agoAdd a missing open_db() call in the new ".dbstat" command of the CLI. analyze-sql-func
drh [Wed, 15 Apr 2026 11:58:54 +0000 (11:58 +0000)] 
Add a missing open_db() call in the new ".dbstat" command of the CLI.

FossilOrigin-Name: a138e44a243466f8679e9652421f8c893a4a1bc0addc86736588d9aee51cf090

13 days agoAdd the .dbstat command to the CLI.
drh [Wed, 15 Apr 2026 11:41:50 +0000 (11:41 +0000)] 
Add the .dbstat command to the CLI.

FossilOrigin-Name: fdba76df2b3a5b4d56ba79f80fd8b16d5faebca1fb07a266262be2ea635e6f94

13 days agoOn platforms which support ./configure --with-icu-config, ensure that 'make tclextens...
stephan [Wed, 15 Apr 2026 11:40:13 +0000 (11:40 +0000)] 
On platforms which support ./configure --with-icu-config, ensure that 'make tclextension' includes the ICU pieces in the tcl extension. Intended to resolve [forum:92a88de4b88929fe|forum post 92a88de4b88929fe].

FossilOrigin-Name: 404fde8bacc3f05254a2fcdb1531a7f53125a7ad45dc6b68a5065c1d0c73b670

13 days agoAvoid a potentially undefined left-shift in the fts5 porter tokenizer.
dan [Wed, 15 Apr 2026 11:23:30 +0000 (11:23 +0000)] 
Avoid a potentially undefined left-shift in the fts5 porter tokenizer.

FossilOrigin-Name: 46a288e43e4c48fca6610bce6a2db418aaa3c8a1dcb115b7a0bfad2063355e58

13 days agoHandle the case where the name of the constraint in an "ALTER TABLE DROP CONSTRAINT...
dan [Wed, 15 Apr 2026 11:07:58 +0000 (11:07 +0000)] 
Handle the case where the name of the constraint in an "ALTER TABLE DROP CONSTRAINT" command is quoted. [forum:8bfbaec404 | Forum post 8bfbaec404].

FossilOrigin-Name: 7f5afb12f4a5d35cfe6b95f17d85ce85ce62159515bfe26fb9c67d3ce26b6d4a

13 days agoCompute the average fanout for b-trees of depth 2 or more.
drh [Wed, 15 Apr 2026 10:49:14 +0000 (10:49 +0000)] 
Compute the average fanout for b-trees of depth 2 or more.

FossilOrigin-Name: 2f8598bb09f32100f22dd1d9465f3fa0f7f8d81f5d67c34de9919708345f090b

13 days agoMinor doc typo fixes contributed by BrickViking.
stephan [Tue, 14 Apr 2026 23:53:38 +0000 (23:53 +0000)] 
Minor doc typo fixes contributed by BrickViking.

FossilOrigin-Name: c4660ce205919ce0d9262e7fd7879375a72ef65d9e5ac97f19caf5dc36e355aa

13 days agoCode simplifications. Return NULL is the specified SCHEMA does not exist.
drh [Tue, 14 Apr 2026 23:19:02 +0000 (23:19 +0000)] 
Code simplifications.  Return NULL is the specified SCHEMA does not exist.

FossilOrigin-Name: 953969c88149ea2f589942b98a0a96d907956319e5aa09e2d5a3ae76d3e7d70a

13 days agoHandle a special case of a corrupt changeset in sqlite3changegroup_add().
dan [Tue, 14 Apr 2026 20:18:54 +0000 (20:18 +0000)] 
Handle a special case of a corrupt changeset in sqlite3changegroup_add().

FossilOrigin-Name: eba625f917935437e3f366197df1c6717c7120ce0418a0cbac1d2024b2235091

13 days agoHave the session module detect some corrupt changesets earlier. corrupt-changeset_fix
dan [Tue, 14 Apr 2026 20:17:41 +0000 (20:17 +0000)] 
Have the session module detect some corrupt changesets earlier.

FossilOrigin-Name: 0de91ff0d798cff21289d893cc441b89fc37b051d5cdf611d92d3ae2bc41cdf2

13 days agoMerge trunk enhancements and fixes into the analyze-sql-func branch.
drh [Tue, 14 Apr 2026 20:17:03 +0000 (20:17 +0000)] 
Merge trunk enhancements and fixes into the analyze-sql-func branch.

FossilOrigin-Name: bb4a9beac87796b4186efce416bf03f840041bc588be6702c5a444d643df684e

2 weeks agoVarious minor tweaks and refinements to the analyze() function.
drh [Tue, 14 Apr 2026 20:07:29 +0000 (20:07 +0000)] 
Various minor tweaks and refinements to the analyze() function.

FossilOrigin-Name: 48d94e72eaec443011dd1f7a7264e5222c05bb515c84deaf20ed4195b74d45ff

2 weeks agoHandle a special case of a corrupt changeset in sqlite3changegroup_add().
dan [Tue, 14 Apr 2026 20:02:49 +0000 (20:02 +0000)] 
Handle a special case of a corrupt changeset in sqlite3changegroup_add().

FossilOrigin-Name: 49b3bac482c831f503c7f90c35959e7ea731950e991baba86b2ab95987d2539b

2 weeks agoImplementation of the analyze() SQL function is now mostly complete.
drh [Tue, 14 Apr 2026 19:36:33 +0000 (19:36 +0000)] 
Implementation of the analyze() SQL function is now mostly complete.

FossilOrigin-Name: 1ca0386ab2df0d88ed52941469d459114f483ecf6b7e4691bcc32e909636cb7d

2 weeks agoMuch, but not all, of the report generation is added. An incremental check-in.
drh [Tue, 14 Apr 2026 19:02:40 +0000 (19:02 +0000)] 
Much, but not all, of the report generation is added.  An incremental check-in.

FossilOrigin-Name: 289fefc3edfeecb06dc11897d3ff24763fd9e25db44e369eeec29b9ed3de5ccc

2 weeks agoEnsure c-tests use the locally built sqlite3.h file, not the system copy. c-tests
dan [Tue, 14 Apr 2026 18:12:09 +0000 (18:12 +0000)] 
Ensure c-tests use the locally built sqlite3.h file, not the system copy.

FossilOrigin-Name: 2d81ee65ffbed30fd98bdda96dc79c1929c73f806cea3c9e4c244b618980b202

2 weeks agoIn RBU vacuum commands, do as SQLite does and ignore any trailing SQL statements...
dan [Tue, 14 Apr 2026 18:08:30 +0000 (18:08 +0000)] 
In RBU vacuum commands, do as SQLite does and ignore any trailing SQL statements in the sql column of the sqlite_schema table.

FossilOrigin-Name: cf7dad1b105ab35cd7180efec735b7cbeaf42b8d53dfec5582b63cd121c3425c

2 weeks agoCheck-in [495e4851d4296b49] breaks the build for Windows. Fixed here.
drh [Tue, 14 Apr 2026 18:06:41 +0000 (18:06 +0000)] 
Check-in [495e4851d4296b49] breaks the build for Windows.  Fixed here.

FossilOrigin-Name: 5b004348c3ec15a02dd657b3619502b6f8ba1c6f46918108b3de9534622076a0

2 weeks agoFurther fixes and clarifications. Now ready to start generating the
drh [Tue, 14 Apr 2026 13:18:04 +0000 (13:18 +0000)] 
Further fixes and clarifications.  Now ready to start generating the
actual report.

FossilOrigin-Name: 037a0e586c4aa81a53aea164080e739f9d5b87197d04fdd68feb0ab5eb01020b

2 weeks agoFurther improvements to error messages and robustness.
drh [Tue, 14 Apr 2026 12:46:12 +0000 (12:46 +0000)] 
Further improvements to error messages and robustness.

FossilOrigin-Name: 45917c1124310fd77daca47865959d3261154f7b0c6771d3689e6d345a3fd153

2 weeks agoImproved error messages and robustness.
drh [Tue, 14 Apr 2026 12:23:11 +0000 (12:23 +0000)] 
Improved error messages and robustness.

FossilOrigin-Name: c09ed9eb914bde96cdc5157e29b6384ce488262a2dadc7321c44941a1d08a187

2 weeks agoInitial prototype implementation of a new run-time loadable SQL function
drh [Tue, 14 Apr 2026 11:25:22 +0000 (11:25 +0000)] 
Initial prototype implementation of a new run-time loadable SQL function
to do approximately the same work as sqlite3_analyze.

FossilOrigin-Name: 03934b5a6c88a97117a4743a68ee36d30bcbdcebcf11342d30ac42daf9f10874

2 weeks agoMinor README typo fix reported off-list by BrickViking.
stephan [Tue, 14 Apr 2026 02:09:43 +0000 (02:09 +0000)] 
Minor README typo fix reported off-list by BrickViking.

FossilOrigin-Name: aa3432af90b2b9ab0b92f56a8e9c926930b9859e986500bd00d5600c1dd036bf

2 weeks agoPass the ICU-related build flags through the 'tclextension' target, not just 'tclexte... tclextension-icu
stephan [Tue, 14 Apr 2026 00:48:34 +0000 (00:48 +0000)] 
Pass the ICU-related build flags through the 'tclextension' target, not just 'tclextension-install'.

FossilOrigin-Name: 499c89f8745fac7ee93ff79a340abd69b4f06b07983b4d50057fa5d0893b2f3b

2 weeks agoTweak 'make tclextension' to pass on any --with-icu-config build flags so that it...
stephan [Tue, 14 Apr 2026 00:11:23 +0000 (00:11 +0000)] 
Tweak 'make tclextension' to pass on any --with-icu-config build flags so that it can link with the various ICU libs. This works for me but needs testing on a wider selection of systems before being moved to trunk. Intended to resolve [forum:92a88de4b88929fe|forum post 92a88de4b88929fe].

FossilOrigin-Name: a8c022d7946e8a29114400c1321f36f03979a2277253f1dcd769d8f36e944ece

2 weeks agoFix typos and inaccuracies in comments. No changes to code.
drh [Mon, 13 Apr 2026 17:33:34 +0000 (17:33 +0000)] 
Fix typos and inaccuracies in comments.  No changes to code.

FossilOrigin-Name: a6c2d7ce84f4f5f8a82cc566a27f98f5418f251e87f1f264ae57935fb10399f7

2 weeks ago".prompt" command improvements in the CLI: Guard against mistakenly saying
drh [Mon, 13 Apr 2026 12:22:16 +0000 (12:22 +0000)] 
".prompt" command improvements in the CLI:  Guard against mistakenly saying
".prompt show" without the "--" before "show".  Add the --hard-reset option
to .prompt to make it more easily testable.

FossilOrigin-Name: 495e4851d4296b49a37b963edd8410314de1510b2ae0b9dbe9dc0307c466c3b5

2 weeks agoImprovements to the prompt_filename() function in the CLI so that it finds
drh [Mon, 13 Apr 2026 11:34:15 +0000 (11:34 +0000)] 
Improvements to the prompt_filename() function in the CLI so that it finds
the database filename even if the connection is not yet fully open.

FossilOrigin-Name: efb3e808a0281014512a812920d526a4909467e925ea000956606318bb6f2e65

2 weeks agoUpdate test/c/snprintf1.c to test the result of the sqlite3_snprintf() call. Also...
dan [Mon, 13 Apr 2026 11:20:51 +0000 (11:20 +0000)] 
Update test/c/snprintf1.c to test the result of the sqlite3_snprintf() call. Also add an SQLITE_OMIT_AUTOINIT configuration and update C tests to account for it.

FossilOrigin-Name: 30b597d797e737a2907b755706a37d63c37c6a06c4e037098a6d9c482bcde887

2 weeks agoLatest upstream jimsh0.c.
stephan [Mon, 13 Apr 2026 10:56:14 +0000 (10:56 +0000)] 
Latest upstream jimsh0.c.

FossilOrigin-Name: 414ae4dd65182ce571a6abb1a1a2ba2c169b204156f4f8923c42f64805a3ef9f

2 weeks agoDoc typo fix which broke the docsrc build, reported by BrickViking.
stephan [Sun, 12 Apr 2026 17:47:57 +0000 (17:47 +0000)] 
Doc typo fix which broke the docsrc build, reported by BrickViking.

FossilOrigin-Name: 3c212b5d85338f90a5f1a2d1484e54c0bf699eedef19a16f4c0de76a76dd9d07

2 weeks agoBug fix in the revised ".prompt" command of the CLI, with test cases.
drh [Sun, 12 Apr 2026 10:46:35 +0000 (10:46 +0000)] 
Bug fix in the revised ".prompt" command of the CLI, with test cases.

FossilOrigin-Name: 7583385593354f90a9818d1820543841109f253dffcec5ca5ed7629336e29fac

2 weeks agoFix a typo which causes .headers to not show up in the shell's .help.
stephan [Sun, 12 Apr 2026 05:41:28 +0000 (05:41 +0000)] 
Fix a typo which causes .headers to not show up in the shell's .help.

FossilOrigin-Name: d379b14a48d331933240fb99ab43c3cc978638d7ad0a8d5975bb211a72eaef2b

2 weeks agoChange the prompt escape design yet again, to use / as the escape character,
drh [Sat, 11 Apr 2026 23:58:15 +0000 (23:58 +0000)] 
Change the prompt escape design yet again, to use / as the escape character,
since % and just about every other punctuation character is special to
cmd.exe, batch files, and nmake, on Windows.

FossilOrigin-Name: 79a8d3edf8207d72f0c4650272ee239a1c7783a07f907fbf0cf5a7ad99b27a2a

2 weeks agoCLI prompt design change: The escape character is changed from \ to
drh [Sat, 11 Apr 2026 22:58:25 +0000 (22:58 +0000)] 
CLI prompt design change:  The escape character is changed from \ to
%#37;.  This avoids lots of quoting problems when trying to specify prompt
strings in various programming languages and shells.

FossilOrigin-Name: e7e6ecc45dfe1a163d259be26877bd7e528ce154e73b3ca8ab7edc5aa94d2d02

2 weeks agoTwo C-preprocessor macros SQLITE_PS1 and SQLITE_PS2 can be set to override
drh [Sat, 11 Apr 2026 22:18:05 +0000 (22:18 +0000)] 
Two C-preprocessor macros SQLITE_PS1 and SQLITE_PS2 can be set to override
the default prompt strings in the CLI.

FossilOrigin-Name: 6fa0216a19c2f165110121227d3f9b9119369f8cd61f9c6d13eaa1ae42a60d60

2 weeks agoMake sqlite3_incomplete() available to extensions.
drh [Sat, 11 Apr 2026 20:53:53 +0000 (20:53 +0000)] 
Make sqlite3_incomplete() available to extensions.

FossilOrigin-Name: 50d81300ba0f021f388aab1e86e97d688ed762cee408c610cf70977f7b488803

2 weeks agoWhen fiddle terminal mode is enabled, add a link to the jquery.terminal project in...
stephan [Sat, 11 Apr 2026 20:43:49 +0000 (20:43 +0000)] 
When fiddle terminal mode is enabled, add a link to the jquery.terminal project in the About box.

FossilOrigin-Name: d64f0c8845104008d6c251f9a1406c6ff717a916c13b64014aa1d154501d5fab

2 weeks agoFix harmless UB in sqlite3_incomplete().
drh [Sat, 11 Apr 2026 20:41:54 +0000 (20:41 +0000)] 
Fix harmless UB in sqlite3_incomplete().

FossilOrigin-Name: 8dfdff559faefd943b97827dc3c7100fc4469e2f8353a264fb322e23af5cb669

2 weeks agofiddle: disable jquery.terminal's pre-processing of user input, as discussed in ...
stephan [Sat, 11 Apr 2026 20:31:03 +0000 (20:31 +0000)] 
fiddle: disable jquery.terminal's pre-processing of user input, as discussed in [forum:c6665017c0dbba1f|forum post c6665017c0dbba1f], with many thanks to the jquery.terminal team for this workaround.

FossilOrigin-Name: ea7e121ab2a7b2fee5372ca12a2a53c7e98ffa1b49d85944f7ce4a7251a777c8

2 weeks agoImprovements to the interactive prompt in the CLI:
drh [Sat, 11 Apr 2026 18:38:54 +0000 (18:38 +0000)] 
Improvements to the interactive prompt in the CLI:
(1) CLI honors SQLITE_PS1 and SQLITE_PS2 envvars as prompt strings,
(2) CLI prompt strings expand various backslash escapes,
(3) No arbitrary length limits on CLI prompt strings,
(4) New default prompt shows the database filename using the \f
escape,
(5) SQLite core adds the sqlite3_incomplate() API, used by
the \H escape in prompt string rendering,
(6) Enhancements to the ".prompt" dot-command.

FossilOrigin-Name: 55af98054e073d6eee3e85fd7564c83eca935ae205da68f5e8f1b561e7f08c00

2 weeks agoFixes for running C tests on windows.
dan [Sat, 11 Apr 2026 18:05:49 +0000 (18:05 +0000)] 
Fixes for running C tests on windows.

FossilOrigin-Name: 1fcacdc41ab1bb66a628acdac29412e66decdc2578dd9d084baaffb74679f984

2 weeks agoFix harmless compiler warnings. cli-prompt
drh [Sat, 11 Apr 2026 17:47:31 +0000 (17:47 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: 3b4cc8d3beab8c910dd954bf8093f7ab499e4690b9cf882f981c4415dd7a7540

2 weeks agoEnhance testrunner.tcl to run individual tests written in C from the test/c/ directory.
dan [Sat, 11 Apr 2026 17:03:27 +0000 (17:03 +0000)] 
Enhance testrunner.tcl to run individual tests written in C from the test/c/ directory.

FossilOrigin-Name: 6f140f76f47aadb10d3f35358503d91adb43e0c1802326f6e599effe1b08e7aa

2 weeks agoInitial test cases for the CLI prompt enhancements.
drh [Sat, 11 Apr 2026 16:12:12 +0000 (16:12 +0000)] 
Initial test cases for the CLI prompt enhancements.

FossilOrigin-Name: b7ecc84735d41e9cdb498020b86d8219efa18ca5b40aef1031a14809f1ac2d38

2 weeks agoAdd --reset, --show, and -- options to the ".prompt" command of the CLI.
drh [Sat, 11 Apr 2026 15:45:45 +0000 (15:45 +0000)] 
Add --reset, --show, and -- options to the ".prompt" command of the CLI.

FossilOrigin-Name: 8075576ba2324a458440bae398baecc7872b6528574b7fe6681a3a30b62d58ef

2 weeks agoEnhancements to shell_prompt_test() for better testing. Enhance the
drh [Sat, 11 Apr 2026 14:11:56 +0000 (14:11 +0000)] 
Enhancements to shell_prompt_test() for better testing.  Enhance the
".open" command so that it does ~/ expansion on filenames.

FossilOrigin-Name: ec6830fe60b73bc606d3c2a5d407a39db53f6dadee760829410abfa1df46389e

2 weeks agoRemove arbitrary limits on the length of CLI prompts. Use environment
drh [Sat, 11 Apr 2026 12:35:53 +0000 (12:35 +0000)] 
Remove arbitrary limits on the length of CLI prompts.  Use environment
variables SQLITE_PS1 and SQLITE_PS2 (if they exist) as the default
CLI prompts.

FossilOrigin-Name: a46ceaeab968d8f376c5a225c23c0be8619fed4511b7e567baf3a8d7736c19d1

2 weeks agoFix the \B escape for prompts so that it uses wcwidth() instead of
drh [Sat, 11 Apr 2026 11:24:09 +0000 (11:24 +0000)] 
Fix the \B escape for prompts so that it uses wcwidth() instead of
strlen() to compute spacing.

FossilOrigin-Name: c6ff4f701d9cf963cf2472ed72ad4e201227560dde2ba8d48602af2e49170e89

2 weeks agoEnsure that sqlite3-opfs-async-proxy.js is copied into the fiddle target dirs.
stephan [Fri, 10 Apr 2026 23:31:29 +0000 (23:31 +0000)] 
Ensure that sqlite3-opfs-async-proxy.js is copied into the fiddle target dirs.

FossilOrigin-Name: 149200861e4690dab5f2e690b62f355b13a8370dccaab5546caa6842b4ff963a

2 weeks agoEnsure that sqlite3-opfs-async-proxy.js is copied into the fiddle target dirs.
stephan [Fri, 10 Apr 2026 23:25:57 +0000 (23:25 +0000)] 
Ensure that sqlite3-opfs-async-proxy.js is copied into the fiddle target dirs.

FossilOrigin-Name: 7c9998de1b839cfbe12c4328ac5176f5fae981e139c5f8888b100752f5e4756b

2 weeks agoA protype of .prompt support in fiddle but its utility there is in doubt because...
stephan [Fri, 10 Apr 2026 23:05:41 +0000 (23:05 +0000)] 
A protype of .prompt support in fiddle but its utility there is in doubt because .open does not work there, so there's very little dynamic info worth showing in a prompt. Also, ANSI colorization can't work there, nor can we colorize the prompts using HTML because of limitations in jquery.terminal.

FossilOrigin-Name: 3b17500dc6338df23d1ed0572cd71593da5a9b048731f73242e27b9a76553a27

2 weeks agoExpose the main /fiddle object to the browser dev console as globalThis.fiddle for...
stephan [Fri, 10 Apr 2026 21:58:13 +0000 (21:58 +0000)] 
Expose the main /fiddle object to the browser dev console as globalThis.fiddle for experimenting with a dynamic prompt.

FossilOrigin-Name: 8574e5c9da3b167384faafb8ec0d01953578676cc42536bb6f7d0e73408ced36

2 weeks agoFix minor issues on Windows.
drh [Fri, 10 Apr 2026 20:44:38 +0000 (20:44 +0000)] 
Fix minor issues on Windows.

FossilOrigin-Name: 48e40d3f6a193d6c4d1b8deda36415a690602dbe33d49984a9d92c6d40d8da5c

2 weeks agoFix prompt for in-memory databases. Fix the continuation mechanism so that
drh [Fri, 10 Apr 2026 20:29:35 +0000 (20:29 +0000)] 
Fix prompt for in-memory databases.  Fix the continuation mechanism so that
it looks at all accumulated lines, not just the most recent line.

FossilOrigin-Name: 166894725569cafa96c434aa14db0428db6791a8296fcc2990bec4ec819fd876

2 weeks agoReplace the former dynamic-continuation prompt logic with backslash-escape
drh [Fri, 10 Apr 2026 20:14:16 +0000 (20:14 +0000)] 
Replace the former dynamic-continuation prompt logic with backslash-escape
prompt expansion, include some expansions that serve the same role as the
old dynamic-continuation prompts.  This allows greater user
configurability.

FossilOrigin-Name: 052631202e4dd930d93434b7003e73b23557934421ace5d2f382f041638d5518

2 weeks agoAdd the \B escape for CLI prompts. Change the default prompts to cli-prompt-redo
drh [Fri, 10 Apr 2026 20:06:34 +0000 (20:06 +0000)] 
Add the \B escape for CLI prompts.  Change the default prompts to
use \f, \H, and \B.

FossilOrigin-Name: 354325b6f396bda38bbb82e7d38aa50d3d6441e1ebb9b578aed8e0bcf62f9911

2 weeks agoThe \H escape on a prompt string fills in with the characters needed
drh [Fri, 10 Apr 2026 19:33:15 +0000 (19:33 +0000)] 
The \H escape on a prompt string fills in with the characters needed
to make the input "complete".  Add the shell_expand_prompt() SQL function
for testing purposes.

FossilOrigin-Name: 6aafb76c74b73aafef74250dae9c8cbe73226c0efb606e8f80ea761b3293cf9d

2 weeks agoMerge trunk fixes and enhancements into the cli-prompt-redo branch
drh [Fri, 10 Apr 2026 18:53:13 +0000 (18:53 +0000)] 
Merge trunk fixes and enhancements into the cli-prompt-redo branch

FossilOrigin-Name: f3354ebf51e684ef680986bef9b606f63786c254f1c8774bcaf7a7f3d0d37056

2 weeks agoImprove defenses in QRF against trying to run the same prepared statement
drh [Fri, 10 Apr 2026 18:14:33 +0000 (18:14 +0000)] 
Improve defenses in QRF against trying to run the same prepared statement
twice, concurrently.

FossilOrigin-Name: 6ab6f622be3e1ad93166d139b5fccf9628c86d1c14c6dfb4464cb8cf52c94785

2 weeks agoAPI doc correction for sqlite3_js_retry_busy(). No code changes.
stephan [Fri, 10 Apr 2026 17:55:31 +0000 (17:55 +0000)] 
API doc correction for sqlite3_js_retry_busy(). No code changes.

FossilOrigin-Name: 749c537812b907164b7e7ad1fddc1aee8106c59875d2686fe83d602cd0e07611

2 weeks agoUse sqlite3_malloc() for memory allocation inside of sqlite3_str_vappendf(),
drh [Fri, 10 Apr 2026 17:11:16 +0000 (17:11 +0000)] 
Use sqlite3_malloc() for memory allocation inside of sqlite3_str_vappendf(),
since it invokes sqlite3_initialize(), whereas sqlite3DbMallocRaw() does
not.

FossilOrigin-Name: a2f84c56316ea746c134aa6e5a2b46021f67c6642161beae8122f73daeddda92

2 weeks agoFix the printf() optimization added at [ccb6b6c4ac21742d] so that
drh [Fri, 10 Apr 2026 15:55:08 +0000 (15:55 +0000)] 
Fix the printf() optimization added at [ccb6b6c4ac21742d] so that
sqlite3_snprintf() does not incorrectly truncate floating-point
conversions that are close to filling the buffer, as reported in
[forum:/forumpost/2026-04-10T13:48:12z|forum post 2026-04-10T13:48:12z].

FossilOrigin-Name: a50521a16068e555aa08ee25726b081bb4cd33e3ea388b82dcbaa691c2576284

2 weeks agoPrototype sqlite3_incomplete() - a variant of sqlite3_complete() that returns
drh [Fri, 10 Apr 2026 13:43:48 +0000 (13:43 +0000)] 
Prototype sqlite3_incomplete() - a variant of sqlite3_complete() that returns
additional information about what is needed to complete the statement.

FossilOrigin-Name: a698fbfb8bb256ee0d9802c01562c11492ca2800a45360b268ac6cf397a7fad7