drh [Mon, 11 May 2026 00:53:44 +0000 (00:53 +0000)]
Fix the xfer optimization so that it does not work if the destination is
a STRICT table that is incompatible with the source.
[forum:/forumpost/4955d2235c22ef4e|Forum post 4955d2235c22ef4e].
stephan [Sat, 9 May 2026 14:01:57 +0000 (14:01 +0000)]
In sqlite-config.tcl remove a reference to the platform name apple when checking for Mac platforms, relying on a check for darwin instead, analog to [b5c6cb13cff53f]. Intended to resolve [forum:c26b856db7dd5caf|forum post c26b856db7dd5caf].
drh [Sat, 9 May 2026 13:16:18 +0000 (13:16 +0000)]
Improved detection of OOM in the regexp_bytecode() SQLite function
(available in debug builds only).
[forum:/forumpost/a3a10e1c7b5dd1d2|Forum post a3a10e1c7b5dd1d2].
drh [Sat, 9 May 2026 12:41:23 +0000 (12:41 +0000)]
Fix an integer truncation problem due to oversized inputs to the
approximate_match virtual table extension.
[forum:/info/625f687e4d25c392|Forum post 625f687e4d25c392].
drh [Sat, 9 May 2026 12:03:14 +0000 (12:03 +0000)]
Fix a corner-case floating-point rounding problem in the generate_series()
virtual table, introduced by [c113e31b818d1677] and reported by
[forum:/info/6e6cf9054bea2b1d|forum post 6e6cf9054bea2b1d].
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].
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].
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].
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.
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.
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.
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.
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].
Updates and simplifications to the mutex implementation on Windows. Uses
Slim Reader/Writer Locks for performance, for non-reentrant mutexes.
Requires WindowsVista or later.
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].
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].
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].
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.
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.
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.
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].
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.
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].
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].
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.
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].
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.