]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
50 min agoImproved detection and reporting of deliberate misinformation in the master
drh [Mon, 20 Jul 2026 20:03:12 +0000 (20:03 +0000)] 
Improved detection and reporting of deliberate misinformation in the
sqlite_schema table.

FossilOrigin-Name: 760af4e455e478f8ab72a574eb5f0141bb57e023beee3d16f9a8c02cbd726e45

96 min agoRemove an incorrect ALWAYS() macro from the implementation of the
drh [Mon, 20 Jul 2026 19:17:30 +0000 (19:17 +0000)] 
Remove an incorrect ALWAYS() macro from the implementation of the
internal exprNodeCanReturnSubtype() routine so that it works with
zero-argument deterministic functions like pi().

FossilOrigin-Name: a2511c6223a08033a2c5c66faee3afa50b992dc18de7a8498c8e3d24ce1376cc

3 hours agoEnsure that a write with REPLACE conflict resolution on an integer primary key column...
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].

FossilOrigin-Name: 8f0ad8f33f5e040eb70b0b77d730c2e785827621bb0ad21afd9ce2efe4dad921

4 hours agoAdditional test cases. do-nothing-replace-bug
drh [Mon, 20 Jul 2026 16:45:50 +0000 (16:45 +0000)] 
Additional test cases.

FossilOrigin-Name: 3ae4f953de5349c7e90ad245a0c21e513d4ef23d636fd786842619aff12c2d27

6 hours agoMove the new test cases for this branch into a new *.test file.
drh [Mon, 20 Jul 2026 14:37:21 +0000 (14:37 +0000)] 
Move the new test cases for this branch into a new *.test file.

FossilOrigin-Name: 7bdce4ec3b9995a13536eaa2e6a5702333e792b35fa58e606b2e4fa38b85f524

9 hours agoPerformance improvement in the sqlite3_initialize() interface.
drh [Mon, 20 Jul 2026 11:50:37 +0000 (11:50 +0000)] 
Performance improvement in the sqlite3_initialize() interface.

FossilOrigin-Name: 4ad701b085ce1b9ada41441f560e55580f0dd33e8145857afce6c665aa974ad0

25 hours agoFix boundary cases of rowid lookup using very large floating point values -
drh [Sun, 19 Jul 2026 19:49:24 +0000 (19:49 +0000)] 
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].

FossilOrigin-Name: 987ba5a3dc5f2a2294b77ef3ec1ea06682f0530a7268777c6b64985dd0e90d40

31 hours agoLatest upstream jimsh0.c for minor portability improvements and cleanups.
stephan [Sun, 19 Jul 2026 12:56:34 +0000 (12:56 +0000)] 
Latest upstream jimsh0.c for minor portability improvements and cleanups.

FossilOrigin-Name: 436cf63e941b3db936a01d4584c9e3cc9675ce9ef4b6689530218c27252c170d

2 days agoTest case fixes due to the previous.
drh [Sat, 18 Jul 2026 19:49:18 +0000 (19:49 +0000)] 
Test case fixes due to the previous.

FossilOrigin-Name: 923665823276ee9404a9fdb19378b970eeea77a97bc2f4312446c6f6bc5e4405

2 days agoAfter a DELETE trigger is fired by REPLACE conflict handling, retest all UNIQUE const...
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].

FossilOrigin-Name: e2ab286bb713e1358ae9a1d50dc894362d0ea6f1a2e8467c587f42f0e483dd3a

2 days agoDisqualify the count-of-view optimization if the view is really
drh [Sat, 18 Jul 2026 17:47:25 +0000 (17:47 +0000)] 
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].

FossilOrigin-Name: bb65c3adcd79581715f90d287807a3f03b375f69957c7d0202d31b23cf627da0

2 days agoUpdate tcl test command "optimization_control" to support the "count-of-view" optimiz...
dan [Sat, 18 Jul 2026 13:34:51 +0000 (13:34 +0000)] 
Update tcl test command "optimization_control" to support the "count-of-view" optimization.

FossilOrigin-Name: b14c3f8fec5123b1faa6d88dee2740ee4acb10dd522207531567d46f4714e227

2 days agoEnhancements to new test cases, for improved readability.
drh [Sat, 18 Jul 2026 09:04:36 +0000 (09:04 +0000)] 
Enhancements to new test cases, for improved readability.

FossilOrigin-Name: 053e0d1f011d9ff4d57a6e33adf8de9a7a5550a3c5f6a6d4c511f75b85a09a99

2 days agoAdd test cases from
drh [Sat, 18 Jul 2026 08:46:36 +0000 (08:46 +0000)] 
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.

FossilOrigin-Name: 49b67b7da6bceae3ee87153480e676f53a472b0f6e0ed8d1866ed819e8f64fa1

2 days agoAdditional test cases
drh [Fri, 17 Jul 2026 23:25:28 +0000 (23:25 +0000)] 
Additional test cases

FossilOrigin-Name: da16fe363e2b0f8e735405a03fd0cae0796333c37d41cb323863d3803ebfdc45

3 days agoEnsure that a write with REPLACE conflict resolution on an integer primary key column...
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].

FossilOrigin-Name: 1875249ab30fb110bc09963b592c8f48d2fb57066d770ad7e1da7e8bc8602977

3 days agoAdd the SQLITE_SHELL_EDITION compile-time option, which if set to a
drh [Thu, 16 Jul 2026 23:55:15 +0000 (23:55 +0000)] 
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.

FossilOrigin-Name: 6924895d2cbc50971d8da1810423ad15c638dabc31b4f1083dd6076e20492ef4

4 days agoRelax the restrictions on reordering tables in vtab queries that occur to the right...
dan [Thu, 16 Jul 2026 13:17:34 +0000 (13:17 +0000)] 
Relax the restrictions on reordering tables in vtab queries that occur to the right of a LEFT or CROSS JOIN but are not actually the RHS of said join.

FossilOrigin-Name: 9062c79fc273d9e59090ea475e7d2abaf33c7cfe9948cbfb92b979a6ed31a37f

5 days agoRelax the restrictions on reordering tables in vtab queries that occur to the right... vtab-outer-joins
dan [Wed, 15 Jul 2026 19:19:03 +0000 (19:19 +0000)] 
Relax the restrictions on reordering tables in vtab queries that occur to the right of a LEFT or CROSS JOIN but are not actually the RHS of said join.

FossilOrigin-Name: 7df34b446edb2e6826f504a9fed13631817ac03e1423539fc4c28efe7ec485e0

6 days agoAdjust QRF to generate lower-case HTML output with the SQLITE_STYLE_Html
drh [Tue, 14 Jul 2026 17:02:47 +0000 (17:02 +0000)] 
Adjust QRF to generate lower-case HTML output with the SQLITE_STYLE_Html
style setting.

FossilOrigin-Name: 4be8630e053de91fb03c960d792960e837cf6360d5d24fbae4fc97b8fcaef062

6 days agoRemove harmless "breakpoint" command inserted by the previous check-in
drh [Tue, 14 Jul 2026 14:52:25 +0000 (14:52 +0000)] 
Remove harmless "breakpoint" command inserted by the previous check-in

FossilOrigin-Name: 5a4b0b81de1abf9c1b73f026b416b29b9bdddc7a1b73ae5b9aa02f3dde131731

6 days agoUpdate some test cases in fts5corrupt3.test and fts5corruptB.test to account for...
dan [Tue, 14 Jul 2026 11:46:07 +0000 (11:46 +0000)] 
Update some test cases in fts5corrupt3.test and fts5corruptB.test to account for recent updates to database and record corruption detection.

FossilOrigin-Name: a48f4cf312b8a1af03b1dc61d8475fc7448fb927e2573fa98882e7b14c065c65

7 days agoAdd assert()s and a testcase() to and fix and improve comments in
drh [Mon, 13 Jul 2026 14:52:13 +0000 (14:52 +0000)] 
Add assert()s and a testcase() to and fix and improve comments in
the percentSort() routine.

FossilOrigin-Name: be673351ebdeba8e78ee11941ecb3e178e4d5212ff07f1d2790320af1d52e6a0

8 days agoImprove documentation for sqlite3_result_zeroblob64(). No changes
drh [Sun, 12 Jul 2026 07:42:55 +0000 (07:42 +0000)] 
Improve documentation for sqlite3_result_zeroblob64().  No changes
to code.

FossilOrigin-Name: c3d307d1367ba08c9ddb9fc26c95131d3e124d7e97896383f21b48cdc154a50a

9 days agoImprovements to the implementation of sqlite3_result_str() so that it
drh [Sat, 11 Jul 2026 19:49:54 +0000 (19:49 +0000)] 
Improvements to the implementation of sqlite3_result_str() so that it
has 100% mutation coverage.

FossilOrigin-Name: 121f54c532d51af017d93996c40a694227064f1204429a7df1f1e2daff862eba

9 days agoMinor change to the "weekday N" modifier in the date/time functions
drh [Sat, 11 Jul 2026 16:14:16 +0000 (16:14 +0000)] 
Minor change to the "weekday N" modifier in the date/time functions
to facilitate 100% mutation test coverage.

FossilOrigin-Name: 76002a6f5de2dadb49ea76571fe395b9c8e261b380068fd2ea88f8326f268109

10 days agoNew compile-time option SQLITE_MAX_SCHEMA and runtime limit option
drh [Fri, 10 Jul 2026 15:06:05 +0000 (15:06 +0000)] 
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.

FossilOrigin-Name: 4ff362a4c2897e2b438d3d8fc88a012264526fa617f058be5a2d596c42d2e8a4

10 days agoEnsure that the "leaf-size" field of an fts5 record is only read from records that...
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].

FossilOrigin-Name: fe52900694e045231e91047fbfd82577c7fa347d7352bd048867a9e95299a0d0

11 days agoIn the sqlite3_rsync utility program, fix three defects identified by
drh [Thu, 9 Jul 2026 16:34:26 +0000 (16:34 +0000)] 
In the sqlite3_rsync utility program, fix three defects identified by
[bugs:/info/e2dfadf51209f12b|Bug e2dfadf51209f12b].

FossilOrigin-Name: 805f3acd2b0e81c8274680cbc4cdd6b7b9246df8075ed9caba9e2780729a2740

12 days agoFix an incorrect free() call in the CLI on Windows when using the -A
drh [Wed, 8 Jul 2026 20:30:22 +0000 (20:30 +0000)] 
Fix an incorrect free() call in the CLI on Windows when using the -A
command-line option.

FossilOrigin-Name: 1ce57ba94b63796d5c9b913e3973751ee4f146bdc452ce8b408d2c0cff7f598d

12 days agoAllow "ALTER TABLE ... DROP CONSTRAINT" to drop foreign key constraints.
dan [Wed, 8 Jul 2026 17:54:16 +0000 (17:54 +0000)] 
Allow "ALTER TABLE ... DROP CONSTRAINT" to drop foreign key constraints.

FossilOrigin-Name: 4b0882cdb5b7947b23023c13e33f532ca44c0645f6a142a3c7bdb143142d9078

12 days agoAllow "ALTER TABLE ... DROP CONSTRAINT" to drop foreign key constraints. drop-constraint-fk
dan [Wed, 8 Jul 2026 17:40:04 +0000 (17:40 +0000)] 
Allow "ALTER TABLE ... DROP CONSTRAINT" to drop foreign key constraints.

FossilOrigin-Name: 17c08963812d6458783720c511806727aeae263a243a11d49b463d2c7867cd54

12 days agoFor display modes in the CLI for which column headers are enabled,
drh [Wed, 8 Jul 2026 15:43:42 +0000 (15:43 +0000)] 
For display modes in the CLI for which column headers are enabled,
make the mode "always" instead of "on.  Improved comments and test
cases.

FossilOrigin-Name: c8aa208bf5b00f3ab93c5edd510dfd0d7edd271c064f159616ee409b308f7eb9

12 days agoMake the (legacy, deprecated) ".header" command in the CLI responsive to title-always-default-on
drh [Wed, 8 Jul 2026 15:34:53 +0000 (15:34 +0000)] 
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.

FossilOrigin-Name: f94259fc07cd7856e9c6f81a46689f4f96bbf464fda7f1d11b51a308c296aca0

13 days agoChange the CLI so that the default "--title" is "always" instead of "on"
drh [Tue, 7 Jul 2026 14:53:53 +0000 (14:53 +0000)] 
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.

FossilOrigin-Name: c3b0fff1b76b8c354b34fef17ff639968698e97234d6ab7af15e0e1a835486e9

13 days agoAdd the "--rowcount on" and "--title always" features to QRF, the CLI, and
drh [Tue, 7 Jul 2026 13:53:57 +0000 (13:53 +0000)] 
Add the "--rowcount on" and "--title always" features to QRF, the CLI, and
the TCL interface.  Make them on by default for "--style psql".

FossilOrigin-Name: 4edba31af4ef18350cb415079fb92cae0c53767fc0e74d63d404296974e75e5c

13 days agoCorrections to the mode matrix in the CLI psql-mode
drh [Tue, 7 Jul 2026 13:24:23 +0000 (13:24 +0000)] 
Corrections to the mode matrix in the CLI

FossilOrigin-Name: 0bca30616566d196d3cb4da1684feaf54bb38e304f4393ace322fc48c0a2f540

13 days agoFix a problem with --rowcount found by Claude in code review.
drh [Tue, 7 Jul 2026 13:16:30 +0000 (13:16 +0000)] 
Fix a problem with --rowcount found by Claude in code review.

FossilOrigin-Name: bc5fb05aa6e8c819cb2c45ea96538b82b5b9c21058ddf685e84d50b183656578

13 days agoImproved title separator in QRF when using "-title always" on an empty row.
drh [Tue, 7 Jul 2026 12:24:50 +0000 (12:24 +0000)] 
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.

FossilOrigin-Name: a102d28fca6376da670b274d3d733da2c73da9abe3e7128defd04b4015b03a48

13 days agoShow --rowcount for "--style insert". New test cases.
drh [Tue, 7 Jul 2026 11:00:10 +0000 (11:00 +0000)] 
Show --rowcount for "--style insert".  New test cases.

FossilOrigin-Name: 386c40e3a9706111542b7f336e82f7bb6e9f43c6056185f9f3bd9aae1159070a

13 days agoContinuing work on --rowcount and --title always.
drh [Tue, 7 Jul 2026 00:23:38 +0000 (00:23 +0000)] 
Continuing work on --rowcount and --title always.

FossilOrigin-Name: adeb4fbb86a8a781d7efb0eecb9c84ce605d0bd45f63992bf2ecd60765a60d2c

2 weeks agoAdd new option "bRowCount" to QRF. Add QRF_Always as a possibility for
drh [Mon, 6 Jul 2026 19:24:15 +0000 (19:24 +0000)] 
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.

FossilOrigin-Name: 600c6b464050078b38cc688668148f684243e7c5f08d0aae4d5f72aa6f985482

2 weeks agoReduce divergence between ext/misc/fossildelta.c,
drh [Mon, 6 Jul 2026 16:26:30 +0000 (16:26 +0000)] 
Reduce divergence between ext/misc/fossildelta.c,
the delta code in ext/rbu/sqlite3rbu.c, and Fossil itself.

FossilOrigin-Name: 7f49a7a90eda01753c0dff65197bd7bc48a751e24a46919d30af6e2baf0788fc

2 weeks agoFix an OOB read caused by passing an out-of-range phrase number to fts5 auxiliary...
dan [Mon, 6 Jul 2026 16:04:51 +0000 (16:04 +0000)] 
Fix an OOB read caused by passing an out-of-range phrase number to fts5 auxiliary API xPhraseFirstColumn() in detail=columns mode.

FossilOrigin-Name: aeb85fdfca0a546cfd3ef26efd58b9ffc8d5fda15562558d8479dee55321596f

2 weeks agoFix a problem in the fossil-delta implementation within RBU causing it to reject...
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].

FossilOrigin-Name: 0bfba3824f3d4c136db8479c97bd789fa0df7c86ba95bd0f011c569004be2166

2 weeks agoFix another buffer overread in RBU that could occur when processing an RBU database...
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].

FossilOrigin-Name: 46c2476b1074fb56c54068dcc04cac5a3b9da3a25bc0d3b95c00439e63d6ec43

2 weeks agoFix an OOB read that could occur in RBU when using a state db with corrupt contents...
dan [Mon, 6 Jul 2026 14:10:43 +0000 (14:10 +0000)] 
Fix an OOB read that could occur in RBU when using a state db with corrupt contents. Bug [bugs:/info/2026-07-06T13:02:00Z | 2026-07-06T13:02:00Z].

FossilOrigin-Name: 9e54159f9a839f7fae3dee348fab862dc4bbe36ab866d0b3927f05fd10b1414a

2 weeks agoAvoid a (harmless) 1-byte OOB read due to malformed inputs in the
drh [Mon, 6 Jul 2026 13:43:42 +0000 (13:43 +0000)] 
Avoid a (harmless) 1-byte OOB read due to malformed inputs in the
normalize.c extension.
[bugs:/info/2026-07-06T13:02:37Z|Bug 2026-07-06T13:02:37Z]

FossilOrigin-Name: b1d7123bc619e3cb9dffa8dd52ba31cc18329b14557d8f2d9e547b729016548c

2 weeks agoReturn an error if a patchset is passed to sqlite3rebaser_configure(). This was causi...
dan [Mon, 6 Jul 2026 11:58:21 +0000 (11:58 +0000)] 
Return an error if a patchset is passed to sqlite3rebaser_configure(). This was causing a buffer overread.

FossilOrigin-Name: 887a29a8373bc3a5405df2288840c4918c045560a3a1de5303a4984eb4b40b50

2 weeks agoIn the strdup.c expension, do not invoke memcpy() with a NULL pointer
drh [Mon, 6 Jul 2026 11:34:46 +0000 (11:34 +0000)] 
In the strdup.c expension, do not invoke memcpy() with a NULL pointer
even if the count is zero.

FossilOrigin-Name: c56da4bba175cac55ea3f159520a583a8e4739dae77365ffe19e9ffcc5841804

2 weeks agoAvoid a buffer overread in the session module when an UPDATE change is rebased agains...
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].

FossilOrigin-Name: ea26bf3cd7fb1116a8a25e767c54a49ca153c29e243b68e523d79120c5832b1d

2 weeks agoProperly handle errors from the readlink() system call in the
drh [Sun, 5 Jul 2026 19:18:33 +0000 (19:18 +0000)] 
Properly handle errors from the readlink() system call in the
fileio.c extension.
[bugs:/info/2026-07-05T12:06:32Z|Bug 2026-07-05T12:06:32Z]

FossilOrigin-Name: 85effd2ad321fb7f02b42e200ad2ba27323b0e866fa3412a56db32ab8e048df5

2 weeks agoFix the parse_create_index() SQL function created by the incremental
drh [Sun, 5 Jul 2026 18:28:35 +0000 (18:28 +0000)] 
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.

FossilOrigin-Name: bd28985523b02875b1045652fe29757e5d5519f48e6109ffebc99212314ab69c

2 weeks agoBe sure to invoke the authorizer callback on all terms of the USING clause
drh [Sun, 5 Jul 2026 16:06:33 +0000 (16:06 +0000)] 
Be sure to invoke the authorizer callback on all terms of the USING clause
in a RIGHT JOIN.
[bugs:/info/2026-07-05T08:15:45Z|Bug 2026-07-05T08:15:45Z]

FossilOrigin-Name: bbd69ce27462000873af053bfebdd305c53deac85c426b1e7dbd927b5f17d622

2 weeks agoAdd the strdup() SQL function extension for use in testing.
drh [Sat, 4 Jul 2026 15:09:52 +0000 (15:09 +0000)] 
Add the strdup() SQL function extension for use in testing.

FossilOrigin-Name: 521a7cf8443d914ae0486aa8a91924ed35a1d5b88082acbe513cef216408c97e

2 weeks agoThe jsonSkipLabel() routine, part of json_each() and json_next(), should
drh [Sat, 4 Jul 2026 12:12:16 +0000 (12:12 +0000)] 
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]

FossilOrigin-Name: 96072f5f872c8e62dedf48a4ba47ca5f3bd55e98b122f62199a1d0be06de95b4

2 weeks agoFix possible one-byte OOB read in the fossildelta.c extension.
drh [Sat, 4 Jul 2026 09:22:27 +0000 (09:22 +0000)] 
Fix possible one-byte OOB read in the fossildelta.c extension.
[bugs:/info/2026-07-04T04:53:59Z|Bug 2026-07-04T04:53:59Z]

FossilOrigin-Name: 8001a373d1c91f92639fb34fca18f9667f1ee92eb6bfa49df06b8cc256385292

2 weeks agoFix possible 1-byte OOB read when decoding a malformed FLOAT5 element
drh [Sat, 4 Jul 2026 08:48:52 +0000 (08:48 +0000)] 
Fix possible 1-byte OOB read when decoding a malformed FLOAT5 element
in JSONB.
[bugs:/info/2026-07-04T04:59:19Z|Bug 2026-07-04T04:59:19Z]

FossilOrigin-Name: 6ed20ab693b298b6b645ee73801ee19952e9c188fba93594634325e12de02848

2 weeks agoImproved data validation in fts5SecureDeleteOverflow().
drh [Fri, 3 Jul 2026 20:26:45 +0000 (20:26 +0000)] 
Improved data validation in fts5SecureDeleteOverflow().
[bugs:/info/2026-07-03T19:16:18Z|Bug 2026-07-03T19:16:18Z]

FossilOrigin-Name: bb1588f04a745ff130edf300f1216e0957c0de28734ccdba1b8a6a4a161dbddf

2 weeks agoAvoid an integer overflow in the string allocator for the snippet()
drh [Fri, 3 Jul 2026 19:13:27 +0000 (19:13 +0000)] 
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]

FossilOrigin-Name: b2816b4d6a2a526e50219aad6051627595ae3a02ef125b5026db6e33509efb0c

2 weeks agoIn ext/wasm, add the ability to omit specific JS APIs and VFSes at build-time.
stephan [Thu, 2 Jul 2026 09:52:03 +0000 (09:52 +0000)] 
In ext/wasm, add the ability to omit specific JS APIs and VFSes at build-time.

FossilOrigin-Name: 0d70a15c3b35e9af3052042cd5332db1b38a66416f1c3c8a50d342395bf22c01

2 weeks agoEnhancements to date/time functions: The "weekday -N" modifier moves
drh [Wed, 1 Jul 2026 12:11:41 +0000 (12:11 +0000)] 
Enhancements to date/time functions:  The "weekday -N" modifier moves
the date backward in time.  The "end of day/month/year" modifiers added.

FossilOrigin-Name: 88901fffcd445ccb97e4e379ea15d8b06d87b8170cad0f717c909944ff21851f

2 weeks agoAdd "end of day/month/year" modifiers to date/time functions. prev-weekday
drh [Wed, 1 Jul 2026 11:57:20 +0000 (11:57 +0000)] 
Add "end of day/month/year" modifiers to date/time functions.

FossilOrigin-Name: 2c4cb3223c6c56d05fe91b8d19b60eac26a274e41f34a2d8f2cf911927581932

2 weeks agoEnhance the "weekday N" modifier for date/time functions such that if
drh [Wed, 1 Jul 2026 03:02:42 +0000 (03:02 +0000)] 
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.

FossilOrigin-Name: e31bea6ce188fb3ae2d8da132a40a182431d701dc6b991af470337a1cdd3f8e4

3 weeks agoAdd new assert()s to help static analyzers realize that the code is correct.
drh [Mon, 29 Jun 2026 15:11:58 +0000 (15:11 +0000)] 
Add new assert()s to help static analyzers realize that the code is correct.

FossilOrigin-Name: 007f0496619e571092382a3668b6bbcc17919908895dc4be71f8d1b6ec2aeeed

3 weeks agoRename omit-api=all to omit-api=ALL to defend against breaking on a substring match... js-omit-pieces
stephan [Mon, 29 Jun 2026 11:59:54 +0000 (11:59 +0000)] 
Rename omit-api=all to omit-api=ALL to defend against breaking on a substring match of 'all' in as-yet-hypothetical future feature names.

FossilOrigin-Name: 225dd27e147b46e85097ada7234a307f55842d98155cd36fe00da57744598bc3

3 weeks agoAdd worker1 to the list of omit-api=X values, per downstream request. Add omit-api...
stephan [Mon, 29 Jun 2026 11:36:44 +0000 (11:36 +0000)] 
Add worker1 to the list of omit-api=X values, per downstream request. Add omit-api=all shorthand.

FossilOrigin-Name: 97ab248b4dd30de76bfbc74ab5cf087df9cd14fd38eb4369a3eadc75953b8c73

3 weeks agoMerge in trunk for continued work on this branch.
stephan [Mon, 29 Jun 2026 11:22:40 +0000 (11:22 +0000)] 
Merge in trunk for continued work on this branch.

FossilOrigin-Name: 14bdec7494757679e7d828ad092546db486a62776d06a9b7799dac50f107e10d

3 weeks agoMark shadow tables when registering a new virtual table that already exists
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].

FossilOrigin-Name: 3e80958a7052a123f4599d64baa8cc31a761e5a58d04c75ca38f2a375d247808

3 weeks agoFix incorrect header comment on the sqlite3ShadowTableName() function.
drh [Sun, 28 Jun 2026 16:40:34 +0000 (16:40 +0000)] 
Fix incorrect header comment on the sqlite3ShadowTableName() function.
Comment chagne only. No changes to code.

FossilOrigin-Name: b5af1a5c7fc8c84e077eb3aa23fbb8712fcaf5143c228db4042f3d811fa6beaf

3 weeks agoCheck for oversized iTermOff in fs5SegIterNextInit() and trigger a
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]

FossilOrigin-Name: 130d4d10dae5957c2be50696545157cd98b6a976affa0c887ff9e1c9e17e97ab

3 weeks agoDo not allow an integer overflow to bypass a leaf-term bound check
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]

FossilOrigin-Name: 74ba971bfafae1eba5e4f4a36e3b31f603f37cdc2010ee09ac251d6e863ac8b0

3 weeks agoMake sure local functions in the series.c extension have only file scope.
drh [Sat, 27 Jun 2026 21:52:55 +0000 (21:52 +0000)] 
Make sure local functions in the series.c extension have only file scope.
[forum:/info/2026-06-27T20:38:26Z|Forum 2026-06-27T20:38:26Z].

FossilOrigin-Name: d8c59f264bdb4ad927fffd9ce78a36a6754487071ff7ce3316edbd63789d7af2

3 weeks agoIn the amatch.c and fuzzer.c extensions (both of which are experimental,
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].

FossilOrigin-Name: 7bcd606c8a2746e3c9258de239e97e14c2e809b91911b1d1b49636dca8fe2d7b

3 weeks agoPut reasonable input limits on the (non-deliverable and obsolete)
drh [Sat, 27 Jun 2026 20:18:46 +0000 (20:18 +0000)] 
Put reasonable input limits on the (non-deliverable and obsolete)
amatch.c extension.
[bugs:/info/2026-06-27T19:15:11Z|Bug 2026-06-27T19:15:11Z]

FossilOrigin-Name: 2fe1366e649ddd964153059b3c33b380af1924afb59210ac3311fd7bc8af5922

3 weeks agoImproved detection of CTEs being misused as table-valued functions.
drh [Sat, 27 Jun 2026 16:07:17 +0000 (16:07 +0000)] 
Improved detection of CTEs being misused as table-valued functions.
Remove an incorrect assert() from check-in [716782abe939083b].

FossilOrigin-Name: ca197caec7b2b4fd71a9853bb2452b7ce7dd2fbb1bbc871aa375558e53c216f7

3 weeks agoAdd a new sqlite3FaultSim() to make it easier to test the changes
drh [Sat, 27 Jun 2026 15:25:53 +0000 (15:25 +0000)] 
Add a new sqlite3FaultSim() to make it easier to test the changes
in check-in [942498724f5bb83b].

FossilOrigin-Name: a4472a17e878fce92d88c1db08e7e390df25f6699e801602cc725cbfdb836e9e

3 weeks agoFix a harmless "jump or move depends on uninitialised value" warning that could occur...
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.

FossilOrigin-Name: 716782abe939083b7732289d862ddfd841057d3458814f96e5e6d7826ec7fa5c

3 weeks agoEnhance the documentation on sqlite3_set_authorizer() to make it clear
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].

FossilOrigin-Name: 45213c1c398cad9d05eda5420ae7379e84fa37d30793f8b4d28c358b88d62931

3 weeks agoFix both a buffer overread and overwrite in the sessions rebase module. Bug [bugs...
dan [Fri, 26 Jun 2026 15:04:47 +0000 (15:04 +0000)] 
Fix both a buffer overread and overwrite in the sessions rebase module. Bug [bugs:/info/2026-06-26T12:16:48Z | 2026-06-26T12:16:48Z].

FossilOrigin-Name: cc36f1741308ea354d540d27c89b92d69a0481885ca3463bdaf0b9ab27464d78

3 weeks agoFix parsing of unterminated "[" tokens in the incremental integrity
drh [Fri, 26 Jun 2026 14:36:05 +0000 (14:36 +0000)] 
Fix parsing of unterminated "[" tokens in the incremental integrity
check extension.
[bugs:/info/2026-06-26T10:05:53Z|Bug 2026-06-26T10:05:53Z].

FossilOrigin-Name: c8f143bd618fe59c18eb92c8f5ae1b153f03cf05e1c457910f6a46599f719809

3 weeks agoAvoid 32-bit integer overflow in the zipfile extension given
drh [Fri, 26 Jun 2026 14:20:32 +0000 (14:20 +0000)] 
Avoid 32-bit integer overflow in the zipfile extension given
ridiculous arguments.
[bugs:/info/2026-06-26T11:40:02Z|Bug 2026-06-26T11:40:02Z]

FossilOrigin-Name: 7eedf458ca4e8e72d309d5d342d364f49950fedca94dc157337e65d766c012c1

3 weeks agoFix a buffer overread that could occur in fts5 within a memcmp() when doing an integr...
dan [Fri, 26 Jun 2026 14:08:42 +0000 (14:08 +0000)] 
Fix a buffer overread that could occur in fts5 within a memcmp() when doing an integrity-check on corrupted records.

FossilOrigin-Name: 062597f10a6d3f8c959a38e4ab6ee1a885499dd7018662e3e6268b2ee6c63c1b

3 weeks agoFix parsing of quoted instantiation arguments in the spellfix extension.
drh [Fri, 26 Jun 2026 13:51:48 +0000 (13:51 +0000)] 
Fix parsing of quoted instantiation arguments in the spellfix extension.
[bugs:/info/2026-06-26T10:52:36Z|Bug 2026-06-26T10:52:36Z]

FossilOrigin-Name: c2e963ad948e0c244d6b883b919ec0815c20018282e04e5649c00e70f5a1d2ed

3 weeks agoFix unbounded whitespace skip in the decimal extension.
drh [Fri, 26 Jun 2026 13:41:07 +0000 (13:41 +0000)] 
Fix unbounded whitespace skip in the decimal extension.
[bugs:/info/2026-06-26T10:06:54Z|Bugs 2026-06-26T10:06:54Z]

FossilOrigin-Name: 71d4cfe5a34cf8485ab2e5abe670381cd068f013233d98c44355a6bcdfcbbbb0

3 weeks agoExtra margin to prevent queue overflow in the RTree extension.
drh [Fri, 26 Jun 2026 13:21:00 +0000 (13:21 +0000)] 
Extra margin to prevent queue overflow in the RTree extension.
[bugs:/info/2026-06-26T12:15:33Z|Bug 2026-06-26T12:15:33Z]

FossilOrigin-Name: de40bfb6b39f3252d1dc2dccc04439ac7b40c1331ded60473950cb4b96fc85f7

3 weeks agoFix the (non-deliverable, testing-use-only) closure extension so that it
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]

FossilOrigin-Name: 11ffa3bfba77b9f3a8c4903d496f63ee26c9873f735d254f35111eecf91228be

3 weeks agoMark the diskused() extension SQL function as direct-only.
drh [Fri, 26 Jun 2026 12:34:22 +0000 (12:34 +0000)] 
Mark the diskused() extension SQL function as direct-only.
[bugs:/info/2026-06-26T10:52:15Z|Bug 2026-06-26T10:52:15Z]

FossilOrigin-Name: b66292820ad17b54eb5f0a48ef9ff01a1b52efd8004307c6faeeb4687ab50567

3 weeks agoFix the size of an allocation in fts3 to take into account that when merging a phrase...
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].

FossilOrigin-Name: df5728d79ff09235041cf01267104f29f482af3473f5a4c849133b6048565725

3 weeks agoImproved detection of corrupt freelist chains on btree pages.
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.

FossilOrigin-Name: 942498724f5bb83b9a7d9bbbea662d152a46a0ccaee26e4b291f090cc6e7d178

3 weeks agoCheck super-journal names for validity earlier, as this simplifies
drh [Thu, 25 Jun 2026 20:26:17 +0000 (20:26 +0000)] 
Check super-journal names for validity earlier, as this simplifies
verification that the logic is correct.

FossilOrigin-Name: 6ba9e19430092aef59f2a7ab6fb7bdacacbb85988f41c155a5af490b0d8a8270

3 weeks agoHave API functions sqlite3_serialize, sqlite3_limit, sqlite3_busy_timeout, sqlite3_er...
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.

FossilOrigin-Name: 7bfd5c810c6f04ddfd275457a2a03b4da0c3e7d4ee5acb61a54d805e2e67f819

3 weeks agoAlso have functions sqlite3_db_name(), sqlite3_get_autocommit(), sqlite3_extended_err... db-mutex-fixes
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.

FossilOrigin-Name: 46509e48d3049a1ca52d9cc3f023634a651cd633d36bd9056ca0172759ba201e

3 weeks agoHave API functions sqlite3_serialize(), sqlite3_limit(), sqlite3_busy_timeout() and...
dan [Thu, 25 Jun 2026 15:47:42 +0000 (15:47 +0000)] 
Have API functions sqlite3_serialize(), sqlite3_limit(), sqlite3_busy_timeout() and sqlite3_error_offset() take the database mutex.

FossilOrigin-Name: fff2c37b9fabbbad20ace60a00e521d198a53125e371f8956275d89eb3c0f32f

3 weeks agoChange the undocumented and unsupported sqlite_log() SQL function so that
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].

FossilOrigin-Name: c30ea3cefe346a3d87b57710a51b059371543c5abc75d08c4ca827bbe3b3f622

3 weeks agoImprove the sqlite3_str_vappendf() routine for additional robustness in the
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].

FossilOrigin-Name: d7e4b2a85f81dacfee497d806bbc9f8c262624bd618aa27d4d238191643a4f5d

3 weeks agoHave sqlite3_drop_modules() take the database mutex. Bug [bugs:/info/2026-06-25T12...
dan [Thu, 25 Jun 2026 14:25:15 +0000 (14:25 +0000)] 
Have sqlite3_drop_modules() take the database mutex. Bug [bugs:/info/2026-06-25T12:11:37Z | 2026-06-25T12:11:37Z ].

FossilOrigin-Name: 533e59b40c4ce6b3579cb85deb9cb1a7179aa2cf4f91d8848558087869653a76

3 weeks agoAdd test case to backup5.test to verify that detaching the destination database from...
dan [Thu, 25 Jun 2026 10:36:51 +0000 (10:36 +0000)] 
Add test case to backup5.test to verify that detaching the destination database from its handle is handled correctly.

FossilOrigin-Name: 50cce4758361379f1585b30c619f2c9f7f8873dbfaeaec3ff357e26c1034546c

3 weeks agoFix a harmless false-positive compiler warning on Windows.
drh [Thu, 25 Jun 2026 00:15:26 +0000 (00:15 +0000)] 
Fix a harmless false-positive compiler warning on Windows.

FossilOrigin-Name: dae75754693143603c8fc9df3f0046dec3577e17a2858e877d238dd0f46899f4

3 weeks agoAlternative to [15a6482300bb2804] that is testable.
drh [Thu, 25 Jun 2026 00:09:14 +0000 (00:09 +0000)] 
Alternative to [15a6482300bb2804] that is testable.

FossilOrigin-Name: 847e6a657451182be73816444c5e6f0e099dacf2cc8b99669e3b96f83dd51117