drh [Fri, 29 May 2026 14:57:38 +0000 (14:57 +0000)]
Rename the ext/misc/analyze.c extension to ext/misc/diskused.c, to avoid
confusion with the src/analyze.c file. The function is now called
"diskused(X)" instead of "analyze(X)". The CLI command is renamed
from ".dbstat" to ".diskused".
drh [Fri, 29 May 2026 12:23:38 +0000 (12:23 +0000)]
The -csv option to the CLI also sets "-limits off", for legacy
compatibility, and because that seems to make sense.
[forum:/info/2026-05-28T16:23:36Z|Forum thread 2026-05-28T16:23:36Z].
drh [Thu, 28 May 2026 11:16:55 +0000 (11:16 +0000)]
Fix an infinite loop that can occur in the unused, untested, and
unsupported ext/misc/btreeinfo.c extension if it is presented with
a corrupt database file.
[bugs:/forumpost/b43c44cc1c|Bug 2026-05-28T05:41:01Z].
dan [Fri, 22 May 2026 14:29:33 +0000 (14:29 +0000)]
Update the session module so that it can apply changesets containing two or more UPDATE changes that form a dependency loop - so that no single UPDATE can be applied independently without violating a constraint.
dan [Fri, 22 May 2026 14:22:14 +0000 (14:22 +0000)]
Add the SQLITE_CHANGESETAPPLY_NOUPDATELOOP option to the sqlite3_changeset_apply_v2/3() method. To disable the extra processing to commit changesets that swap two or more values subject to a UNIQUE constraint between rows.
drh [Thu, 21 May 2026 15:14:35 +0000 (15:14 +0000)]
Fix the VFSes so that there is no 32-bit integer overflow in the
xShmMap method if the WAL file size exceeds about 25 terabytes, or
if the header is corrupted to make SQLite think that the WAL file size
is that big.
[bugs:/info/2026-05-21T03:53:03Z|Bug 2026-05-21T03:53:03Z].
drh [Thu, 21 May 2026 13:37:15 +0000 (13:37 +0000)]
Limit the length of inputs to the spellfix1_editdist() extension
function (not part of the standard SQLite build and rarely used)
to 99999 characters, to avoid any possibility of integer overflow.
[bugs:/forumpost/5da728247a|Bug 5da728247a].
drh [Thu, 21 May 2026 13:03:18 +0000 (13:03 +0000)]
A join constraint is not an equivalence unless both operands have the
same collation.
[bugs:/info/2026-05-21T03:39:28Z|Bug 2026-05-21T03:39:28Z].
Error goes back to version 3.7.17, 13 years ago.
drh [Thu, 21 May 2026 12:04:20 +0000 (12:04 +0000)]
Enhance the xfer-optimization to verify access to the source table using
the authorizer, if an authorizer is registered.
[bugs:/info/2026-05-21T03:31:22Z|Bug 2026-05-21T03:31:22Z].
dan [Wed, 20 May 2026 11:41:24 +0000 (11:41 +0000)]
Avoid returning an SQLITE_SCHEMA error from within sqlite3session_diff() if the schema has been recently modified. First <a href=https://sqlite.org/bugs/forumpost/269f1e9cef>reported here</a>.
drh [Wed, 20 May 2026 00:16:20 +0000 (00:16 +0000)]
Improvements to testrunner.tcl: Make C-program tests responsive to the
pattern list. Do not remove build steps until the very end when we are
certain that the build step is not required. The pattern list matches
the exact text of the displayname column of the jobs table.
drh [Tue, 19 May 2026 19:33:49 +0000 (19:33 +0000)]
Silently ignore nested porter tokenizers in FTS5. Having nested porter
tokenizers is pointless, but it does use stack space unnecessarily.
[bugs:/forumpost/a7766198f1|Bug report a7766198f1].
drh [Tue, 19 May 2026 18:45:05 +0000 (18:45 +0000)]
Fix an assertion fault that can occur in RTree given a carefully
corrupted database.
[bugs:/forumpost/2026-05-18T06:46:01Z|Bug report 2026-05-18T06:46:01Z].
drh [Tue, 19 May 2026 12:40:00 +0000 (12:40 +0000)]
Early detection of attempts to overwrite an in-use cache page due
to database corruption.
[https://issues.chromium.org/issues/513858286|Chromium 513858286].
drh [Tue, 19 May 2026 11:15:33 +0000 (11:15 +0000)]
Security enhancements to the untested and unused fossildelta.c extension.
Bug reports [bugs:/forumpost/3ac3fe3d71|3ac3fe3d71] and
[bugs:/forumpost/e7e470b760|e7e470b760].
drh [Tue, 19 May 2026 10:30:13 +0000 (10:30 +0000)]
Limit the size of input strings to the (disused) spellfix extension
to avoid excessive runtime and integer overflows.
[bugs:/forumpost/24a33e5d10|Bugs report 24a33e5d10].
drh [Mon, 18 May 2026 23:58:14 +0000 (23:58 +0000)]
Fix a NULL pointer dereference in the obscure (and unused) prefixes
extension, which I had forgotten even existed.
[bugs:/forumpost/24a33e5d10|Bug report 24a33e5d10].
drh [Mon, 18 May 2026 19:44:04 +0000 (19:44 +0000)]
When a subquery is an argument to an SQLITE_SUBTYPE function, then set
the EP_SubtArg flag on the result-set expressions of that subquery.
[bugs:/forumpost/8de44412fd|Bug report 8de44412fd].
dan [Mon, 18 May 2026 18:59:06 +0000 (18:59 +0000)]
Update the session module so that it can apply changesets containing two or more UPDATE changes that form a dependency loop - so that no single UPDATE can be applied independently without violating a constraint.
drh [Mon, 18 May 2026 17:55:40 +0000 (17:55 +0000)]
Fix the window-function variant of the json_group_object() function so
that it correctly handles NULL entries.
[bugs:/forumpost/0de87b23b3|Bug report 0de87b23b3].
drh [Mon, 18 May 2026 14:28:53 +0000 (14:28 +0000)]
Do not attempt the OR-optimization on conjuncts that contain COLLATE
operators because (1) such cases are rare and (2) they are tricky to
get right and are thus prone to bugs and hard to test.
[bugs:/forumpost/329521b269|Bugs report 329521b269] is one
such bug that goes back about 20 years and thus demonstrates both
points of the previous sentence.
drh [Mon, 18 May 2026 11:35:44 +0000 (11:35 +0000)]
Correction to the bugfix at [212c68249cc0e890] so that it works
for 2nd and subsequent terms of a row value.
[bugs:/forumpost/ba8084256b|Bugs report ba8084256b].
drh [Sun, 17 May 2026 17:18:12 +0000 (17:18 +0000)]
Fix the sqlite3_value_numeric_type() interface so that it works even if
the argument is an sqlite3_value object that came from sqlite3_value_dup().
[forum:/forumpost/15c4a323bb|Forum post 15c4a323bb].
drh [Sat, 16 May 2026 20:21:55 +0000 (20:21 +0000)]
When two tables are joined by USING, the affinity and collating sequence of
the join column will be the same as one or the other of the columns in the
two tables (which are hopefully the same).
drh [Sat, 16 May 2026 19:40:55 +0000 (19:40 +0000)]
When two tables are joined by USING, the affinity of the join column can
be the affinity of the corresponding column in either table. But it must
be one or the other.
drh [Sat, 16 May 2026 17:28:56 +0000 (17:28 +0000)]
Fix false-negatives in the sqlite3ExprCanReturnSubtype() routine having
to do with CASE, CAST, and COLLATE expressions and the "+" no-op operator.
[forum:/forumpost/1f0168a120:Forum post 1f0168a120].
dan [Fri, 15 May 2026 18:36:11 +0000 (18:36 +0000)]
Have window functions sum(), total() and avg() correctly handle the obscure case where integer overflow occurs as part of the same step that adds the first real value to the running total.
dan [Fri, 15 May 2026 17:24:34 +0000 (17:24 +0000)]
Have the sqlite_dbpage module correctly handle constraints of the form "WHERE pgno=$pgno" when $pgno is an integer that cannot be represented as a signed, 32-bit value.
drh [Thu, 14 May 2026 22:39:41 +0000 (22:39 +0000)]
If there is a WHERE clause constraint of the form "a=$var", then
automatically reprepare the query if the binding of $var changes, as
that could affect the query plan.
dan [Thu, 14 May 2026 17:54:23 +0000 (17:54 +0000)]
Handle constraints like "a=$var" where the value bound to $var is -1, 0 or 1 in the same way as a literal -1, 0, 1. This might cause excessive reprepares.
drh [Thu, 14 May 2026 12:46:41 +0000 (12:46 +0000)]
In QRF, relax the constraint on the screen width so that it can be as
wide as a 32-bit signed integer can count.
[forum:/forumpost/2570051b60|Forum post 2570051b60].
drh [Wed, 13 May 2026 18:07:01 +0000 (18:07 +0000)]
Change to compile-time option that omits non-UWP system calls to
SQLITE_UWP. Takes steps to eliminate all non-UWP system calls when that
compile-time option is used.
stephan [Wed, 13 May 2026 12:06:27 +0000 (12:06 +0000)]
Slightly rework the --editline configure flag for purposes of distinguishing between the two conventional libedit headers. When using libedit, invoke setlocale(), which appears to resolve [forum:aad7a634916ff050|forum post aad7a63491]'s report of non-ASCII input failng to work when linking against libedit.
drh [Mon, 11 May 2026 16:58:05 +0000 (16:58 +0000)]
Fix the xfer-optimization such that if the destination table has
constraints on the hidden rowid, the optimization is not attempted.
[forum:/forumpost/6dcc95e3ca|Forum post 6dcc95e3ca].
drh [Mon, 11 May 2026 14:22:45 +0000 (14:22 +0000)]
Prevent internal-use-only SQL functions from being used inside of a CHECK
constraint added using ALTER TABLE ADD CONSTRAINT.
[forum:/forumpost/6256ee34ed|Forum post 6256ee34ed].