Remove an incorrect ALWAYS() macro from the implementation of the
internal exprNodeCanReturnSubtype() routine so that it works with
zero-argument deterministic functions like pi().
dan [Mon, 20 Jul 2026 17:53:36 +0000 (17:53 +0000)]
Ensure that a write with REPLACE conflict resolution on an integer primary key column is handled after any IGNORE or FAIL conflicts, even if there is also an explicit "ON CONFLICT" clause unrelated to the IPK. Forum post [forum:info/2026-07-17T09:30:42Z | 2026-07--17T09:30:42Z]. Also fix a problem whereby a trigger fired by REPLACE conflict resolution might cause a UNIQUE conflict violation to be committed to the database. Forum post [forum:/info/2026-07-18T09:45:24Z | 2026-07-18T09:45:24Z].
Fix boundary cases of rowid lookup using very large floating point values -
values near the minimum and maximum 64-bit signed integer.
[forum:/info/2026-07-19T07:31:46Z|Forum 2026-07-19T07:31:46Z].
dan [Sat, 18 Jul 2026 19:31:56 +0000 (19:31 +0000)]
After a DELETE trigger is fired by REPLACE conflict handling, retest all UNIQUE constraints to ensure that the row being inserted or updated does not conflict with one written by the DELETE trigger. Abort the statement if it does. Possible fix for forum post [forum:/info/2026-07-18T03:35:48Z | 2026-07-18T03:35:48Z].
Disqualify the count-of-view optimization if the view is really
a correlated subquery.
[forum:/info/2026-07-18T10:23:43Z|Forum post 2026-07-18T10:23:43Z].
Add test cases from
[forum:/info/2026-07-18T03:35:48Z|Forum Post 2026-07-18T03:35:48Z].
New test cases are currently failing, as new or alternative fixes
are needed for the original problem.
dan [Fri, 17 Jul 2026 16:26:56 +0000 (16:26 +0000)]
Ensure that a write with REPLACE conflict resolution on an integer primary key column is handled after any IGNORE or FAIL conflicts, even if there is also an explicit "ON CONFLICT" clause unrelated to the IPK. Forum post [forum:/info/2026-07-17T09:30:42Z | 2026-07-17T09:30:42Z].
Add the SQLITE_SHELL_EDITION compile-time option, which if set to a
date number of the form YYYYMMDD will try to configure the defaults
to be similar to the latest release at or prior to that date.
New compile-time option SQLITE_MAX_SCHEMA and runtime limit option
SQLITE_LIMIT_SCHEMA that put an upper bound on the number of objects
in a database schema. Current default is 10 million.
dan [Thu, 9 Jul 2026 20:56:29 +0000 (20:56 +0000)]
Ensure that the "leaf-size" field of an fts5 record is only read from records that are actually leaves and are large enough to contain it. Bug [bugs:/info/2026-07-09T20:15:55Z | 2026-07-09T20:15:55Z].
Make the (legacy, deprecated) ".header" command in the CLI responsive to
the "always" title mode. Clean up title mode and define its operation with
improved comments in the TCL interface and in the CLI. Add the
"-title auto" option to the CLI.
Change the CLI so that the default "--title" is "always" instead of "on"
for some display modes. This check-in also include a fix to "--title always"
for the "markdown" display mode.
Improved title separator in QRF when using "-title always" on an empty row.
Improved comments on the mode matrix in the CLI code. Additional test
cases.
Add new option "bRowCount" to QRF. Add QRF_Always as a possibility for
bTitles. Use these feature to enhance ".mode psql" to be a better
approximation of what psql actually does.
dan [Mon, 6 Jul 2026 15:13:52 +0000 (15:13 +0000)]
Fix a problem in the fossil-delta implementation within RBU causing it to reject some well-formed delta records. Bug [bugs:/info/2026-07-06T13:01:22Z | 2026-07-06T13:01:22Z].
dan [Mon, 6 Jul 2026 14:37:08 +0000 (14:37 +0000)]
Fix another buffer overread in RBU that could occur when processing an RBU database with corrupt rbu_control fields. Bug [bugs:/info/2026-07-06T13:01:41Z | 2026-07-06T13:01:41Z].
dan [Mon, 6 Jul 2026 08:36:48 +0000 (08:36 +0000)]
Avoid a buffer overread in the session module when an UPDATE change is rebased against a baseline that records fewer columns than the UPDATE. Bug [bugs:/info/2026-07-05T13:57:01Z | 2026-07-05T13:57:01Z].
Fix the parse_create_index() SQL function created by the incremental
integrity_check extension so that it works for widely correct CREATE INDEX
statements.
[bugs:/info/2026-07-05T12:00:57Z|Bug 2026-07-05T12:00:57Z].
Also fix the extension so that it removes the parse_create_index() function.
Add the sqlite3_intck_register() API function so that the
parse_create_index() function can be more easily tested.
The jsonSkipLabel() routine, part of json_each() and json_next(), should
never return an index outside of the range of bytes of the input JSONB.
[bugs:/info/2026-07-04T04:58:54Z|Bug 2026-07-04T04:58:54Z]
Avoid an integer overflow in the string allocator for the snippet()
function of FTS3/4, when SQLITE_MAX_LENGTH is unusually large.
[bugs:/info/2026-07-03T18:34:04Z|Bug 2026-07-03T18:34:04Z]
Enhance the "weekday N" modifier for date/time functions such that if
the argument is negative, it move the date backwards in time to the
matching weekday, rather than forwards.
drh [Sun, 28 Jun 2026 19:05:29 +0000 (19:05 +0000)]
Mark shadow tables when registering a new virtual table that already exists
after the schema has loaded. Test cases in TH3.
[bugs:/info/2026-06-26T12:45:51Z|Bug 2026-06-26T12:45:51Z].
drh [Sun, 28 Jun 2026 00:21:50 +0000 (00:21 +0000)]
Check for oversized iTermOff in fs5SegIterNextInit() and trigger a
corruption error if detected.
[bugs:/info/2026-06-27T18:46:54Z|Bug 2026-06-27T18:46:54Z]
drh [Sat, 27 Jun 2026 23:04:36 +0000 (23:04 +0000)]
Do not allow an integer overflow to bypass a leaf-term bound check
in the integrity-check function of FTS5.
[bugs:/info/2026-06-27T18:47:28Z|Bug 2026-06-27T18:47:28Z]
drh [Sat, 27 Jun 2026 20:30:17 +0000 (20:30 +0000)]
In the amatch.c and fuzzer.c extensions (both of which are experimental,
for testing purposes only, and are not part of any deliverable) treat
NULL inputs as empty strings.
[bugs:/info/2026-06-27T19:32:29Z|Bug 2026-06-27T19:32:29Z].
dan [Fri, 26 Jun 2026 19:31:46 +0000 (19:31 +0000)]
Fix a harmless "jump or move depends on uninitialised value" warning that could occur when using a virtual table as the RHS of an outer join within a trigger.
drh [Fri, 26 Jun 2026 15:27:30 +0000 (15:27 +0000)]
Enhance the documentation on sqlite3_set_authorizer() to make it clear
that the authorizer callback is not invoked for elements of an expression
in a generated column.
[bugs:/info/2026-06-26T12:42:48Z|Bugs 2026-06-26T12:42:48Z].
drh [Fri, 26 Jun 2026 13:00:38 +0000 (13:00 +0000)]
Fix the (non-deliverable, testing-use-only) closure extension so that it
parses quoted instantiation arguments correctly.
[bugs:/info/2026-06-26T10:06:27Z|Bug 2026-06-26T10:06:27Z]
dan [Fri, 26 Jun 2026 11:36:54 +0000 (11:36 +0000)]
Fix the size of an allocation in fts3 to take into account that when merging a phrase doclist, each entry may grow by up to 1 byte if the rhs position of the merged lists is stored. Bug [bugs:/info/2026-06-26T08:08:39Z | 2026-06-26T08:08:39Z].
drh [Fri, 26 Jun 2026 09:55:59 +0000 (09:55 +0000)]
Improved detection of corrupt freelist chains on btree pages.
Plus, add assert()s to verify that the min-heap does not overflow
inside of PRAGMA integrity_check.
dan [Thu, 25 Jun 2026 17:07:53 +0000 (17:07 +0000)]
Have API functions sqlite3_serialize, sqlite3_limit, sqlite3_busy_timeout, sqlite3_error_offset, sqlite3_db_name, sqlite3_get_autocommit, sqlite3_errcode, sqlite3_total_changes64, sqlite3_changes64, sqlite3_last_insert_rowid and sqlite3_expired take and hold the database mutex while running.
dan [Thu, 25 Jun 2026 16:24:06 +0000 (16:24 +0000)]
Also have functions sqlite3_db_name(), sqlite3_get_autocommit(), sqlite3_extended_errcode(), sqlite3_errcode(), sqlite3_total_changes64(), sqlite3_changese64(), sqlite3_last_insert_rowid() and sqlite3_expired() take the database mutex.
drh [Thu, 25 Jun 2026 15:17:15 +0000 (15:17 +0000)]
Change the undocumented and unsupported sqlite_log() SQL function so that
it is marked as unsafe and direct-only.
[bugs:/info/3311f8d5b8|Bug 2026-06-25T10:19:43Z].
drh [Thu, 25 Jun 2026 14:48:09 +0000 (14:48 +0000)]
Improve the sqlite3_str_vappendf() routine for additional robustness in the
face of over-sized inputs.
Probable fix for [bugs:/info/2026-06-25T11:29:23Z|Bug 2026-06-25T11:29:23Z].