stephan [Wed, 28 Jan 2026 17:25:18 +0000 (17:25 +0000)]
Capture sqlite3_rsync's remote-end result code so the local side can exit with non-0 if, e.g., the remote sqlite3_rsync binary is found but fails to start. [forum:43eb1cd1c3979817|Confirmation received] that it resolves the motivating problem report.
drh [Tue, 27 Jan 2026 23:33:42 +0000 (23:33 +0000)]
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].
drh [Tue, 27 Jan 2026 16:18:35 +0000 (16:18 +0000)]
The tmstmpvfs.c extension should not modify the content of pages going into
the WAL file, as that would corrupt the page checksum used for recovery.
Instead, only insert timestamp information as content is written into the
database file.
stephan [Tue, 27 Jan 2026 16:15:22 +0000 (16:15 +0000)]
Teach sqlite3_rsync to increment its error count when a child process fails, based on [forum:8fe404e547faa42e|forum post 8fe404e547faa42e]. This passes basic sanity tests but requires more testing and needs a review of the final 'else' block in the new code.
drh [Tue, 27 Jan 2026 14:59:08 +0000 (14:59 +0000)]
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.
drh [Mon, 26 Jan 2026 21:20:28 +0000 (21:20 +0000)]
Enhancements to tmstmpvfs.c: (1) Use the exact same timestamp on logfile
entries as on the pages that control, where appropriate. (2) Include the
WAL frame number in ELOG_CKPT_PAGE logfile entries.
drh [Sun, 25 Jan 2026 15:18:31 +0000 (15:18 +0000)]
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].
drh [Sat, 24 Jan 2026 17:18:56 +0000 (17:18 +0000)]
Assert() statements added to sqlite3_result_text64() and
sqlite3_bind_text64() to detect misuse of SQLITE_UTF8_ZT that can
result in undefined behavior.
stephan [Sat, 24 Jan 2026 01:17:06 +0000 (01:17 +0000)]
Expose SQLITE_UTF_ZT to WASM for completeness's sake, but the WASM build does not expose sqlite3_bind_text64() or sqlite3_result_text64() because it only supports UTF8 encoding, so ZT does not currently have a genuine use there.
drh [Fri, 23 Jan 2026 20:46:54 +0000 (20:46 +0000)]
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].
drh [Fri, 23 Jan 2026 00:55:36 +0000 (00:55 +0000)]
Add the SQLITE_UTF8_ZT value which can be the encoding argument to
sqlite3_result_text64() or sqlite3_bind_test64() to indicate that the
argument is UTF-8 text that is zero-terminated.
drh [Thu, 22 Jan 2026 19:02:32 +0000 (19:02 +0000)]
Enhance the [/info/e33da6d5dc964db8|EXISTS-to-JOIN optimization] so that
the inserted JOIN terms are not required to be on the inner-most loops,
as long as all dependencies for the EXISTS-to-JOIN loops are in outer
loops. This addresses the performance concern of
[forum:/forumpost/2026-01-21T19:49:04z|forum post 2026-01-21T19:49:04z].
Test cases in TH3.
drh [Wed, 21 Jan 2026 19:24:07 +0000 (19:24 +0000)]
Add a new encoding constant SQLITE_UTF8_ZT, which if used with
sqlite3_result_text64() or sqlite3_bind_text64() declares that the
string provided is UTF8 and zero-terminated at the length specified.
stephan [Tue, 20 Jan 2026 17:10:22 +0000 (17:10 +0000)]
wasm: a potential workaround for cases such as [forum:1eec339854c935bd|forum post 1eec339854c935bd], where client-local needs require overriding Emscripten config defaults (which we very intentionally do not document or support for reasons explained in that thread). This is untested because it requires a special-needs setup, but it doesn't break anything for run-of-the-mill cases.
drh [Mon, 19 Jan 2026 19:51:03 +0000 (19:51 +0000)]
Be more aggressive about using a sort-and-merge to compute the UNION of
two SELECT statements. Experimental branch. This check-in is failing some
tests.
drh [Mon, 19 Jan 2026 11:44:59 +0000 (11:44 +0000)]
Add two new JSON functions: json_array_insert() and jsonb_array_insert().
Patterned after the json_array_insert() function of MySQL.
[forum:/forumpost/2026-01-17T10:40:39z|Forum thread 2026-01-17T10:40:39z].
drh [Sat, 17 Jan 2026 14:23:28 +0000 (14:23 +0000)]
Add new SQL function: json_array_insert(). Suggested in
[forum:/forumpost/2026-01-17T10:40:39z|forum thread 2026-01-17T10:40:39z].
This check-in seems to work, but contains no test cases. Also, no error
is raised if the PATH does not reference an array. Prototype only.
drh [Fri, 16 Jan 2026 15:53:20 +0000 (15:53 +0000)]
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].
drh [Tue, 13 Jan 2026 02:35:19 +0000 (02:35 +0000)]
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].
drh [Mon, 12 Jan 2026 19:56:00 +0000 (19:56 +0000)]
Avoid unsigned integer overflow in the delta_apply() extension function.
Not part of any standard deliverable.
[forum:/forumpost/d41879b367c7f7ec|Forum thread d41879b367c7f7ec].
stephan [Sun, 11 Jan 2026 14:14:16 +0000 (14:14 +0000)]
wasm: add @preserve tags to two comment blocks (license header and build version info) so that the npm tools know to retain those comments when minifying.
stephan [Fri, 9 Jan 2026 19:44:31 +0000 (19:44 +0000)]
Add the 'npm' ext/wasm makefile target to create npm-bundle.zip for use by the downstream npm package. This target is intended to become their path for pulling npm-relevant deliverables, rather than the canonical downloads, and they have our/my commitment not to break it without involving them first.
drh [Fri, 9 Jan 2026 00:41:35 +0000 (00:41 +0000)]
Fix potential OOB read on the undocumented test function rtreenode() that
is part of the RTREE extension, as described in
[forum:/forumpost/2026-01-08T23:32:19Z|forum post 2026-01-08T23:32:19Z].
The problem is almost certainly harmless since any memory allocation will
be a multiple of 8 bytes, and once the input buffer size gets rounded up to
the next multiple of 8 bytes, the access will still be within bounds.
Nevertheless, it still needs to be fixed.
drh [Thu, 8 Jan 2026 20:29:02 +0000 (20:29 +0000)]
Enhance VACUUM INTO so that if a URI filename is used as the target and that
filename as a reserve=N query parameter with N between 0 and 255, then the
reserve amount for the generated database copy is set to N. This simplifies
making a copy of a database file with a reduced or reset reserve.
stephan [Thu, 8 Jan 2026 18:15:23 +0000 (18:15 +0000)]
Fix the sqlite3-worker1.mjs (ESM, non-bundler) build and have demo-worker1-promiser use that file rather than the vanilla one, as a test case. Delete the global symbol installed by that file in ESM and bundler builds, as it's unnecessary there. The first change should resolve [https://github.com/sqlite/sqlite-wasm/issues/123|downstream sqlite-wasm/issues/123], with thanks to Jure Rotar for his help.
drh [Thu, 8 Jan 2026 13:43:15 +0000 (13:43 +0000)]
Enhance the --vfs command-line option to the CLI such that if the argument
is not a valid VFS name, but is the name of a file, attempt to load that
file as an extension, which presumably adds the desired VFS.
drh [Thu, 8 Jan 2026 12:39:49 +0000 (12:39 +0000)]
Do not show LIKE wildcards on table names in the output of the ".schema"
command in the CLI.
[forum:/info/6ebb57b41691293d|Forum post 6ebb57b41691293d].
drh [Thu, 8 Jan 2026 12:22:50 +0000 (12:22 +0000)]
Add the showtmlog utility for decoding the tmstmpvfs log files.
Fix tmstmpvfs so that it records timestamps in milliseconds since the
Unix epoch, not in JDN milliseconds.
drh [Thu, 8 Jan 2026 01:37:13 +0000 (01:37 +0000)]
Improve showdb so that it does a better job of handling reserve-bytes.
Add the --tmstmp option that causes pgidx to interpret tmstmpvfs tags
if they are available.