]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
2 months agoFix harmless UB by declaring a constant 1 to be unsigned. format-json
drh [Thu, 7 May 2026 14:47:21 +0000 (14:47 +0000)] 
Fix harmless UB by declaring a constant 1 to be unsigned.

FossilOrigin-Name: c5235734a6787b9c59a356f4e0ccbb3f262b8d9a6407ebd415afc87e859b0498

2 months agoFix another off-by-one error.
drh [Thu, 7 May 2026 14:30:34 +0000 (14:30 +0000)] 
Fix another off-by-one error.

FossilOrigin-Name: 8ae724a647dfcb986c4037caaab07e5d0188e66b66039a4758937c963f1fcbf7

2 months agoBug fixes in the new %J and %j logic.
drh [Thu, 7 May 2026 14:14:05 +0000 (14:14 +0000)] 
Bug fixes in the new %J and %j logic.

FossilOrigin-Name: d1b55572c76569cb1e999028e79bcf2e76069f8778f0c8e933ace606d7b6a8b2

2 months agoAdd support for width to %J and %j.
drh [Thu, 7 May 2026 10:46:39 +0000 (10:46 +0000)] 
Add support for width to %J and %j.

FossilOrigin-Name: 0b102f2076586c08b134c78cc18acdd05555fa2b534c895535e96a0466661910

2 months agoSeparate conversion letters %J and %j. %J includes surrounding quotes and
drh [Thu, 7 May 2026 08:58:10 +0000 (08:58 +0000)] 
Separate conversion letters %J and %j.  %J includes surrounding quotes and
%j omits them.  Some test cases added.

FossilOrigin-Name: ea7c2c1a6bd32695fc3a1f2295b4c4719e3d9dd0a8f6480e7c95e17b564c3391

2 months agoGet precision working on %J, both with and with the ! flag. Width is
drh [Thu, 7 May 2026 00:02:55 +0000 (00:02 +0000)] 
Get precision working on %J, both with and with the ! flag.  Width is
still a no-op, and there are no test cases.  Incremental check-in.

FossilOrigin-Name: 18166bce208c64b7f3afaa88c27a10e0295a89f9c72942dcaa949cf7efb479e6

2 months agoExperimental prototype of the %J conversion in printf().
drh [Wed, 6 May 2026 20:48:34 +0000 (20:48 +0000)] 
Experimental prototype of the %J conversion in printf().

FossilOrigin-Name: 7f6b1bae0849f0a840b95ae95aa6fdc6d51b72fdd50493649f584ad7829a3060

2 months agoFix a minor typo in a comment in the json module.
drh [Wed, 6 May 2026 19:13:21 +0000 (19:13 +0000)] 
Fix a minor typo in a comment in the json module.

FossilOrigin-Name: 5c6d3e9d83af94234f67b06bd23c4eb0178a80c74c39be4945b3282244630020

2 months agoMinor internal doc typo fixes.
stephan [Wed, 6 May 2026 06:57:42 +0000 (06:57 +0000)] 
Minor internal doc typo fixes.

FossilOrigin-Name: d588680240a7f4395f2ef52dd78635de66120a677a41a28ceb96921b3333973d

2 months agoDelete the OPFS SEE test dbs when done with them.
stephan [Tue, 5 May 2026 15:31:41 +0000 (15:31 +0000)] 
Delete the OPFS SEE test dbs when done with them.

FossilOrigin-Name: cbb9f7bcd04c586d523192f32c0ce7dcec72a76bb9a9c3b67fcde1f9e79f7218

2 months agoAdd importDb() tests of SEE databases for the opfs/opfs-wl VFSes, analog to the opfs...
stephan [Tue, 5 May 2026 15:26:24 +0000 (15:26 +0000)] 
Add importDb() tests of SEE databases for the opfs/opfs-wl VFSes, analog to the opfs-sahpool test in [a5a9ac7ad6622b].

FossilOrigin-Name: 534d388031dfacf83cb40c712150a376db10393c98936a33ea80da0166b3dbeb

2 months agoFor the various OPFS VFS db-import routines, in SEE builds (only) relax the is-this...
stephan [Tue, 5 May 2026 08:51:10 +0000 (08:51 +0000)] 
For the various OPFS VFS db-import routines, in SEE builds (only) relax the is-this-a-db check to allow for SEE dbs not having the usual header string in cleartext. Addresses [https://sqlite.org/see/forumpost/f84bef3552|SEE forum post f84bef3552].

FossilOrigin-Name: a5a9ac7ad6622b5b07193aa279deefde7d59ca17f81aba9dd78ee90718446993

2 months agoFix a predicate which causes a false error in the OPFS SAHPool tests when building...
stephan [Tue, 5 May 2026 08:11:55 +0000 (08:11 +0000)] 
Fix a predicate which causes a false error in the OPFS SAHPool tests when building with SEE.

FossilOrigin-Name: 97ab0a2fd56501d08bc2ab2adbe70a4130f6c5b5db343941fa16c7b34c550bd3

2 months agoAdd #include time.h to shell.c.in to get fiddle building with emcc 5.x.
stephan [Tue, 5 May 2026 07:57:54 +0000 (07:57 +0000)] 
Add #include time.h to shell.c.in to get fiddle building with emcc 5.x.

FossilOrigin-Name: ae675dfe7946d37f224f22ad34b6ebe049fb1426cb3d49d88ebc10d0b7634e40

2 months agoFix a test case on CLI ".help" output due to the output changing because
drh [Mon, 4 May 2026 18:36:04 +0000 (18:36 +0000)] 
Fix a test case on CLI ".help" output due to the output changing because
of check-in [1590b401ff0670b6].

FossilOrigin-Name: b6ad35096d48de29fd8da498ac23cd7eba9194a70cad05ec49c318f11fe77199

2 months agoWhen using the OR-optimization on a loop created by exists-to-join, do the early...
dan [Mon, 4 May 2026 18:16:09 +0000 (18:16 +0000)] 
When using the OR-optimization on a loop created by exists-to-join, do the early-exit logic for the whole loop, not for each individual OR branch. Possible fix for forum post [forum:c8b205720c | c8b205720c].

FossilOrigin-Name: 70a5d091241748aea63aa13bb218b573d0b84615a0682c2ec693addbfe9bc2f4

2 months agoWhen using the OR-optimization on a loop created by exists-to-join, do the early... exists-or-expr-fix
dan [Mon, 4 May 2026 17:16:43 +0000 (17:16 +0000)] 
When using the OR-optimization on a loop created by exists-to-join, do the early-exit logic for the whole loop, not for each individual OR branch. Possible fix for forum post [forum:c8b205720c | c8b205720c].

FossilOrigin-Name: 3d197dd03c47a0fb687064131dbf519b8c587a47f9c2bccfdb83d7eae8418336

2 months agoAdd a missing tcl quote which breaks the build on msys2.
stephan [Mon, 4 May 2026 16:18:25 +0000 (16:18 +0000)] 
Add a missing tcl quote which breaks the build on msys2.

FossilOrigin-Name: 9380be51c76392eca9544f1fd56373406d2ce001e77a8d476deb772968f2aacc

2 months agoAdd the --color and --no-color options to the ".prompt" command of the CLI.
drh [Mon, 4 May 2026 12:58:05 +0000 (12:58 +0000)] 
Add the --color and --no-color options to the ".prompt" command of the CLI.

FossilOrigin-Name: 1590b401ff0670b68910504c281e67ecae7ae357ba3ed65f96dabaabd7aaeb7f

2 months agoHonor the NO_COLOR environment variable. If NO_COLOR is set and
drh [Mon, 4 May 2026 10:14:13 +0000 (10:14 +0000)] 
Honor the NO_COLOR environment variable.  If NO_COLOR is set and
SQLITE_PS1 and SQLITE_PS2 are not set, then the default prompt is
monochrome and ANSI escapes are omitted.  Also change the name of
the SQLITE_PS_NOANSI compile-time option to SQLITE_NO_COLOR.

FossilOrigin-Name: 7e4134e3ff1ca8712f5fc78fadae665549450988dc43af27c7fe0c77f10ce3fb

2 months agoNew test cases for the shell prompt
drh [Sun, 3 May 2026 18:31:49 +0000 (18:31 +0000)] 
New test cases for the shell prompt

FossilOrigin-Name: 2340cbbd230bdadedbb5d3eb9cfd287fd934e69ce5a2c989e141b0fc87b947aa

2 months agoImprovements to the non-printing character delimiter logic in the CLI
drh [Sun, 3 May 2026 15:53:52 +0000 (15:53 +0000)] 
Improvements to the non-printing character delimiter logic in the CLI
prompt, for improved accuracy and for improved testability.

FossilOrigin-Name: f5649795cd8d7a1f270037ef0b212ea605c1665ec05a75a6da0b250f2aeab070

2 months agoChange the non-printing character escapes for editline to U+0001 and
drh [Sat, 2 May 2026 23:40:40 +0000 (23:40 +0000)] 
Change the non-printing character escapes for editline to U+0001 and
U+0002.  Also insert those escapes for readline.  Readline does not
need it (because it can figure them out on its own) but they are needed
when editline is being used in readline-compatibility mode, and we have
no way of distinguishing between editline and readline in that case, so
we might as well include them.

FossilOrigin-Name: b9545b0f0b6fa0a777a064e1410b17f52cb49d853c188f9b8b3a772bd810ece3

2 months agoAttempt to automatically insert U+0001 escape bytes before and after
drh [Sat, 2 May 2026 23:03:42 +0000 (23:03 +0000)] 
Attempt to automatically insert U+0001 escape bytes before and after
ANSI X3.64 escape sequences when using editline, to work around the
limitations of editline.

FossilOrigin-Name: 63050bee6e5ed46cead14bd5a02b0cb6a7dbcdcb6a56601b90c10cf1c8d84efc

2 months agoFix a harmless compiler warning on some MSVC versions.
drh [Sat, 2 May 2026 20:19:31 +0000 (20:19 +0000)] 
Fix a harmless compiler warning on some MSVC versions.

FossilOrigin-Name: bb8f6deeff31e9cc9b5a88b17b29dc6cd4fb4515134fa8e9758e33e42bbe89b0

2 months agoMinor optimization to the authorizer.
drh [Sat, 2 May 2026 17:30:33 +0000 (17:30 +0000)] 
Minor optimization to the authorizer.

FossilOrigin-Name: 625f78a630bbf897f945065f1b85a92fe26e426302c8f6edc4d26a817ff62358

2 months agoFix harmless compiler warnings.
drh [Sat, 2 May 2026 15:58:28 +0000 (15:58 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: a0d0b5aff51088699e5ad0a726c350d10744b1779acd9ee54232659fb4c352a4

2 months agoClose database connections in a timely manner to fix test script problems
drh [Sat, 2 May 2026 11:47:22 +0000 (11:47 +0000)] 
Close database connections in a timely manner to fix test script problems
on Windows.

FossilOrigin-Name: 068a53865a17d4c2b4ce227fc08a2c019d1dbf31d833842ec08ab5665a3565a3

2 months agoFix an SQLITE_MISUSE memory error in check-ini [1f940357f7bb160b].
drh [Fri, 1 May 2026 17:42:15 +0000 (17:42 +0000)] 
Fix an SQLITE_MISUSE memory error in check-ini [1f940357f7bb160b].

FossilOrigin-Name: fc64113e8f9aee0161e682db7c244a7849f2db86551a557b276deb1785941476

2 months agoHarden the recovery extension against SQL injections coming from the
drh [Fri, 1 May 2026 16:06:21 +0000 (16:06 +0000)] 
Harden the recovery extension against SQL injections coming from the
sqlite_schema table of the database being recovered.

FossilOrigin-Name: 9190f1b9b8889e4d80c370db36b916744d5779de0ec51da0369bbe74adb7b931

2 months agoCheck-in [1786fcd5b4ee6cd9] works great and generates correct code, but it
drh [Fri, 1 May 2026 16:03:51 +0000 (16:03 +0000)] 
Check-in [1786fcd5b4ee6cd9] works great and generates correct code, but it
upset UBSAN.  This check-in fixes the UBSAN complaint.

FossilOrigin-Name: 7cd76847e8c9b683e39c1063a343288f11b4aa5e9302394fe0c4244d361ee4f1

2 months agoThe value for /f and other filename substitutions in SQLITE_PS1 is now
drh [Thu, 30 Apr 2026 18:23:58 +0000 (18:23 +0000)] 
The value for /f and other filename substitutions in SQLITE_PS1 is now
"memory" if open on an in-memory database.

FossilOrigin-Name: 4aac1057eeaf6c29a4893e9c080497c780b0963e810c501532d79eba1b457f27

2 months agoRemove lots of code used to support legacy Windows version (WindowsXP and
drh [Thu, 30 Apr 2026 16:52:56 +0000 (16:52 +0000)] 
Remove lots of code used to support legacy Windows version (WindowsXP and
before).  Use Slim Reader/Writer Locks on Windows for non-recursive mutexes,
since SRWLs are now available on all supported Windows platforms.

FossilOrigin-Name: 6f7a5ff22db10f889596239aae5f6a1130cbdfe72612ceee68cbeb3b86e40227

2 months agoFix a harmless compiler warning in src/mutex_w32.c.
drh [Thu, 30 Apr 2026 15:41:01 +0000 (15:41 +0000)] 
Fix a harmless compiler warning in src/mutex_w32.c.

FossilOrigin-Name: 8de796ca459f2c996937fe1107838b217572636110c8c09e358343385bf17a1b

2 months agoFix the memdb1.test test module so that it runs correctly on Windows.
drh [Thu, 30 Apr 2026 15:33:44 +0000 (15:33 +0000)] 
Fix the memdb1.test test module so that it runs correctly on Windows.

FossilOrigin-Name: 9012f8ea7454bbb792b4361ed74d778e02b98ef44a443f9a23a27a4222fda747

2 months agoChange the CLI warning that appears in the header about opening a
drh [Thu, 30 Apr 2026 15:19:09 +0000 (15:19 +0000)] 
Change the CLI warning that appears in the header about opening a
in-memory database, to be more readable.

FossilOrigin-Name: cc64cafdfe0b0965fabaf9d561d9a108c20a3643f71b36e6a6c51fc8f30b82cb

2 months agoAdd the /m escape to the CLI prompt string. Use it to show "memory"
drh [Thu, 30 Apr 2026 15:07:25 +0000 (15:07 +0000)] 
Add the /m escape to the CLI prompt string.  Use it to show "memory"
in italic for the default prompt for in-memory databases.

FossilOrigin-Name: 1e3c95393044279997833145cb610b98926fb0c8f53ae4fb35e9fcc6c1ded1a2

2 months agoFix a crash that could occur if the destination database of a backup is
dan [Wed, 29 Apr 2026 19:14:54 +0000 (19:14 +0000)] 
Fix a crash that could occur if the destination database of a backup is
replaced using sqlite3_deserialize() between the call to sqlite3_backup_init()
and the first call to sqlite3_backup_step(). Forum post [forum:15d82885e2 | 15d82885e2].

FossilOrigin-Name: 1f940357f7bb160b583ac5b08ff4e32a9fef353255d032c5a18bcb04416c0f0b

2 months agoReduce the number of system calls in the os_win.c thunk from 81 down omit-legacy-windows
drh [Wed, 29 Apr 2026 16:09:47 +0000 (16:09 +0000)] 
Reduce the number of system calls in the os_win.c thunk from 81 down
to 58, as well as other simplifications.

FossilOrigin-Name: c49521739c961ed5e38424bf26b2e34d8017a85122622ceac5af7398233fe343

2 months agoFurther simplifications to the interface to the Windows family of OSes.
drh [Wed, 29 Apr 2026 15:03:01 +0000 (15:03 +0000)] 
Further simplifications to the interface to the Windows family of OSes.
An incremental check-in.

FossilOrigin-Name: f2aa6b66d2a1b5bb2dc8a44788a061a549a846244354df19b44398839578461e

2 months agoSimplify the Windows interface by removing support for various WindowsXP
drh [Wed, 29 Apr 2026 14:02:23 +0000 (14:02 +0000)] 
Simplify the Windows interface by removing support for various WindowsXP
and WindowsCE.  This is a work-in-progress.  More to follow.

FossilOrigin-Name: 4dbc4d19c4f3b58d0bedd766cfba65d9624903a5ab0a340eb83ddeec058607ea

2 months agoUpdates and simplifications to the mutex implementation on Windows. Uses win-mutex-revamp
drh [Tue, 28 Apr 2026 20:01:03 +0000 (20:01 +0000)] 
Updates and simplifications to the mutex implementation on Windows.  Uses
Slim Reader/Writer Locks for performance, for non-reentrant mutexes.
Requires WindowsVista or later.

FossilOrigin-Name: a75aa5400f94531b8ffd00be4580b0578d8d81ba9681fd06b1d9d96a6180994c

2 months agoAttempt to align instances of the sqlite3_mutex object at 128-byte boundaries
drh [Tue, 28 Apr 2026 15:12:40 +0000 (15:12 +0000)] 
Attempt to align instances of the sqlite3_mutex object at 128-byte boundaries
to prevent false-sharing in multi-core machines. See the discussion at and
around [forum:/forumpost/2026-03-25T23:15:03Z|forum post 2026-03-25T23:15:03Z].

FossilOrigin-Name: 1786fcd5b4ee6cd9b4780f3687dfaec5b90ef0476e0da266a94e069b98e70514

2 months agoFix comment typo
drh [Tue, 28 Apr 2026 12:49:10 +0000 (12:49 +0000)] 
Fix comment typo

FossilOrigin-Name: d64a1dbe0fb2d9286806d833a3146b21d5bf1636a650d5a64cf163c7f2356e98

2 months agoImproved detection of when the alternative windows-compatible main() is
drh [Mon, 27 Apr 2026 14:01:23 +0000 (14:01 +0000)] 
Improved detection of when the alternative windows-compatible main() is
needed in the sqldiff.exe utility.

FossilOrigin-Name: e25b849a603cb08ab888641ff324e9aa129391c4792de86a62c55e9caf84c16e

2 months agoRelax arbitrary length restrictions on some error messages in the CLI.
drh [Mon, 27 Apr 2026 12:43:09 +0000 (12:43 +0000)] 
Relax arbitrary length restrictions on some error messages in the CLI.

FossilOrigin-Name: 52f5531ded8e0d3da3dc4d5c9b3d14573041b9446e2c45b5093c958b6c74e0de

2 months agoIncrease a stack-local buffer size to resolve a test regression introduced in [ff084a...
stephan [Mon, 27 Apr 2026 12:05:56 +0000 (12:05 +0000)] 
Increase a stack-local buffer size to resolve a test regression introduced in [ff084ae341eab5c], in which some tests fail a pattern match check if their absolute file names are too long. Resolves [forum:205f73db1b2806f5|forum post 205f73db1b2806f5].

FossilOrigin-Name: 286fc22c7ca882b0b09de2f1b2a7e0b382af6c498f2f8ad237fe064feaa70d7f

2 months agoFix a crash that could occur if sqlite3_deserialize() was used to overwrite a databas...
dan [Mon, 27 Apr 2026 11:32:43 +0000 (11:32 +0000)] 
Fix a crash that could occur if sqlite3_deserialize() was used to overwrite a database with an open transaction on it. Bug introduced by [fc42d31d6fca21ab] on 2018-03-07 and first released in version 3.23.0. This is not a vulnerability as an attacker that can exploit this already has the ability to execute arbitrary code. Forum post [forum:39134ba029 | 39134ba029].

FossilOrigin-Name: 77662cce9aa452ba5820e5f1a864a802763bd83b937cdb16e7025219eff7bd08

2 months agoRefactor the uint128 type check to consolidate duplicated rules.
stephan [Mon, 27 Apr 2026 06:48:07 +0000 (06:48 +0000)] 
Refactor the uint128 type check to consolidate duplicated rules.

FossilOrigin-Name: 362ef7bc00eea180fb3458bd8887021aed54e321901483edc00ad6b23a33d8e5

2 months agoFeature detection fix for uint128 on RISCV 32-bit, reported in [forum:f8d1417ce8eb2f2...
stephan [Mon, 27 Apr 2026 05:55:38 +0000 (05:55 +0000)] 
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

2 months agoImprovements to temp-file cleanup on close in the CLI.
drh [Sun, 26 Apr 2026 18:35:26 +0000 (18:35 +0000)] 
Improvements to temp-file cleanup on close in the CLI.

FossilOrigin-Name: 048c969c34eaaf8c203b996e999a7dbc94c47b4959719af9e6625052520f7135

2 months agoIn the CLI, eliminate the 2-second delay before getting the prompt back
drh [Sat, 25 Apr 2026 16:17:23 +0000 (16:17 +0000)] 
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

2 months agoSimplify the modePush()/modePop() implementation in the CLI.
drh [Sat, 25 Apr 2026 15:05:46 +0000 (15:05 +0000)] 
Simplify the modePush()/modePop() implementation in the CLI.

FossilOrigin-Name: 92cad2cd7284d3a969b713336865007da2b0b2a8eef367d4185802174cbd027a

2 months agoDo not run expridx2.test as part of the "journaltest" permutation, as it requires...
dan [Sat, 25 Apr 2026 14:32:05 +0000 (14:32 +0000)] 
Do not run expridx2.test as part of the "journaltest" permutation, as it requires wal mode.

FossilOrigin-Name: 11cfbae735669776c967522294b1606af90b4bd5379e2e1ed722520887b57757

2 months agoFix a single-byte OOB read that could occur in the session module when concatenating...
dan [Sat, 25 Apr 2026 14:00:29 +0000 (14:00 +0000)] 
Fix a single-byte OOB read that could occur in the session module when concatenating patchsets.

FossilOrigin-Name: 60d7cd625a6160ba1bc60fd00fab2e91e0deff42034c6864107c19330b35ea7a

2 months agoMinor code simplification in the CLI.
drh [Sat, 25 Apr 2026 10:45:17 +0000 (10:45 +0000)] 
Minor code simplification in the CLI.

FossilOrigin-Name: 59795c71e5745e8a27dc596b9f1fc8f137df58a6ec8d8d0dab2b31cf8562796d

2 months agoFix a problem in the CLI in which the ".www" command followed by
drh [Sat, 25 Apr 2026 00:29:40 +0000 (00:29 +0000)] 
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

2 months agoFix test cases due to recent CLI default prompt changes. Make sure ANSI
drh [Fri, 24 Apr 2026 20:27:42 +0000 (20:27 +0000)] 
Fix test cases due to recent CLI default prompt changes.  Make sure ANSI
escape codes are recognized on Windows terminals.

FossilOrigin-Name: 22b791e404f0895b0f343b2ce0e169a7ada8578e46a39a9f4bd3a31f81c9853c

2 months agoImprovements to the default prompt for the CLI.
drh [Fri, 24 Apr 2026 09:21:25 +0000 (09:21 +0000)] 
Improvements to the default prompt for the CLI.

FossilOrigin-Name: 9ab0bb487f78ba5a51cd3b4efcee23b11096e90ebf3add4da18aea657e8de0b6

2 months agoImproved default prompt in the CLI.
drh [Thu, 23 Apr 2026 22:15:18 +0000 (22:15 +0000)] 
Improved default prompt in the CLI.

FossilOrigin-Name: 78193b60346dba304485241dd65f0eb6e971714397b76191b3bf7a5fdb44916b

2 months agoFix harmless compiler warnings. Enhance the CLI prompt mechanism to make
drh [Thu, 23 Apr 2026 20:13:14 +0000 (20:13 +0000)] 
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

2 months agoFix a bug in [dbc1d6f0a3452607] that disrupts the display when running
drh [Thu, 23 Apr 2026 20:06:16 +0000 (20:06 +0000)] 
Fix a bug in [dbc1d6f0a3452607] that disrupts the display when running
on a Windows console (not redirecting to a file).

FossilOrigin-Name: 75b5df2b0046827e985712b5725488b59667e2cfd171cde9f1194f2917165205

2 months agoImprovements to the #define mechanism in the CLI that allows other programs
drh [Thu, 23 Apr 2026 16:40:34 +0000 (16:40 +0000)] 
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

2 months agoHave testrunner.tcl return a non-zero exit status if one or more tests have failed.
dan [Thu, 23 Apr 2026 15:54:00 +0000 (15:54 +0000)] 
Have testrunner.tcl return a non-zero exit status if one or more tests have failed.

FossilOrigin-Name: 50ddc36d32540b6d98990b5c9a465beb5b68cc31ae3f0ed162f6fe07e7c74e2d

2 months agoNew CLI prompt escape sequences: /r, /A, /v, /V, and /D../D.
drh [Thu, 23 Apr 2026 15:05:46 +0000 (15:05 +0000)] 
New CLI prompt escape sequences:  /r, /A, /v, /V, and /D../D.

FossilOrigin-Name: e7c7acd1a4e5cb0f8e68f119352480c1aa9dd3c2b289c92f88e9e697a2e440e0

2 months agoFix harmless compiler warning.
drh [Thu, 23 Apr 2026 14:49:21 +0000 (14:49 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: 706373dcbe43752cf21604f278f96fb3015a36089ad64f069bb3a64bc526d137

2 months agoCLI shell: handle the special case of .prompt "" to not incorrectly report that as...
stephan [Thu, 23 Apr 2026 14:05:36 +0000 (14:05 +0000)] 
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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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

2 months 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