]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
2 hours agoImprovements to the implementation of sqlite3_result_str() so that it master
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

5 hours 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

30 hours 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

2 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

2 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

3 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

3 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

3 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

3 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

3 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

5 days 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

5 days 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

5 days 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

5 days 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

5 days 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

5 days 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

5 days 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

5 days 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

5 days 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

5 days 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

6 days 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

6 days 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

6 days 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

7 days 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

7 days 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

7 days 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

7 days 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

8 days 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

8 days 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

9 days 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

10 days 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

10 days 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

10 days 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

12 days 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

12 days 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

12 days 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

12 days 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

13 days 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

13 days 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

13 days 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

13 days 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 weeks agoCheck for cells extending too far past the end of a page while search
drh [Wed, 24 Jun 2026 20:20:57 +0000 (20:20 +0000)] 
Check for cells extending too far past the end of a page while search
an index.  [bugs:/info/2026-06-24T14:55:57Z|Bug 2026-06-24T14:55:57Z]

FossilOrigin-Name: 6d0696706a9e2f70229b2db52f053e540fe0a89290a6c57f23ec0c8bd7a49213

2 weeks agoRemove ALWAYS() and NEVER() macros used for developmemt testing on index-cell-overflow
drh [Wed, 24 Jun 2026 20:17:20 +0000 (20:17 +0000)] 
Remove ALWAYS() and NEVER() macros used for developmemt testing on
this branch.

FossilOrigin-Name: f3532fc55a2be273acb97023165e96817c291576a9d6d45f8d6e7ae57adbd577

2 weeks agoWhen rolling back a journal that contains a super-journal pointer, only attempt to...
dan [Wed, 24 Jun 2026 19:28:55 +0000 (19:28 +0000)] 
When rolling back a journal that contains a super-journal pointer, only attempt to unlink the super-journal if (a) the filename looks like one that SQLite might have generated, and (b) the super-journal contains the name of the journal being rolled back. This is to limit the extent to which SQLite can be caused to delete arbitrary files by supplying it with a crafted hot-journal. Report [bugs:/info/2026-06-24T14:18:00Z | 2026-06-24T14:18:00Z].

FossilOrigin-Name: 6d8da8861c8ccbfdbe838587dc2f5ef1817bc0af4a6167940446ee7bdc53955c

2 weeks agoUpdate mjournal.test so that it works on windows. del-super-filter
dan [Wed, 24 Jun 2026 19:07:30 +0000 (19:07 +0000)] 
Update mjournal.test so that it works on windows.

FossilOrigin-Name: 6007b5c2d3c27a4597631914d4114b626ba647954ecfb381de67d4cf27d31ccd

2 weeks agoOnly delete a super-journal if it contains a pointer to the current database's journa...
dan [Wed, 24 Jun 2026 18:51:36 +0000 (18:51 +0000)] 
Only delete a super-journal if it contains a pointer to the current database's journal. Test cases in this commit might be broken on some platforms.

FossilOrigin-Name: c768be03d4885557c9520c37e3cecbf5647d358a87cd34948578a4a0a8a59a5e

2 weeks agoCheck for cells that extend of the end of a page when searching indexes.
drh [Wed, 24 Jun 2026 18:50:44 +0000 (18:50 +0000)] 
Check for cells that extend of the end of a page when searching indexes.
This is a work-in-progress.
This check-in includes four NEVER() and ALWAYS() macros for which simple
test cases are needed.

FossilOrigin-Name: 27ffb3eefede00e1caa51684c82e0aefa2a86ab3d00aa23874be9afc75c2a8b4

2 weeks agoDo not delete super-journal files named "xyz.9hh" unless the library is built with...
dan [Wed, 24 Jun 2026 18:03:20 +0000 (18:03 +0000)] 
Do not delete super-journal files named "xyz.9hh" unless the library is built with SQLITE_ENABLE_8_3_FILENAMES.

FossilOrigin-Name: 3973e37a1ef528676de44ddb1b1f18d55b90fca1f6b43c51c3f3ba613267bb92

2 weeks agoWhen rolling back a journal that contains a super-journal pointer, only attempt to...
dan [Wed, 24 Jun 2026 17:14:57 +0000 (17:14 +0000)] 
When rolling back a journal that contains a super-journal pointer, only attempt to unlink the super-journal if the filename looks like one that SQLite might have generated. This is to limit the extent to which SQLite can be caused to delete arbitrary files by supplying it with a crafted hot-journal.  Bug [bugs:/info/2026-06-24T14:18:00Z | 2026-06-24T14:18:00Z].

FossilOrigin-Name: 0cdde6755837935e4feaa4367a0b107e363582adc8112a91dc7416f1100ae3aa

2 weeks agoAvoid trying to delete a database file while it is still open in backup5.test.
dan [Wed, 24 Jun 2026 14:17:52 +0000 (14:17 +0000)] 
Avoid trying to delete a database file while it is still open in backup5.test.

FossilOrigin-Name: 395cbed103af08e3a4fafd9a3041205535e019d4aeb58b46c4a7e4f3bca545c9

2 weeks agoFix a comment in os_kv.c so that it does not match "###" and thus does
drh [Wed, 24 Jun 2026 13:46:37 +0000 (13:46 +0000)] 
Fix a comment in os_kv.c so that it does not match "###" and thus does
not cause false-positives when searching the output of gcov.  No
changes to code.

FossilOrigin-Name: 5482548b6bca2827246cd2cc928c89a953365da5ebe42d3a2876371ec6880f1b

2 weeks agoFix the sqlite3ParseUri() for improved defenses against ridiculously long
drh [Wed, 24 Jun 2026 13:45:04 +0000 (13:45 +0000)] 
Fix the sqlite3ParseUri() for improved defenses against ridiculously long
URI inputs causing integer overflow problems.
[bugs:/info/2026-06-24T11:46:39Z|Bug 2026-06-24T11:46:39Z].

FossilOrigin-Name: 140a693ee0c0cfa8f332cd1bbdfe045c016e4bf5169d6dd94648cbe38d7517c6

2 weeks agoRevert the fixes to backup in [1f940357f7] and [e5db80350c] and instead fix the probl...
dan [Wed, 24 Jun 2026 13:42:39 +0000 (13:42 +0000)] 
Revert the fixes to backup in [1f940357f7] and [e5db80350c] and instead fix the problem reported by forum post [forum:15d82885e2 | 15d82885e2] (that a call to sqlite3_deserialize() after sqlite3_backup_init() but before the first call to sqlite3_backup_step() on the destination db of a backup could cause a crash) by deferring caching the pointer to the destination Btree until after it is locked. This addresses bug [bugs:/info/2026-06-24T08:41:13Z | 2026-06-24T08:41:13Z].

FossilOrigin-Name: 18da5759590793c934184a6f1e28fe61a9714f305f1e9704061364325c0bbf9e

2 weeks agoRemove a stray C++ style comment left in build.c by the previous commit on this branch. attach-backup-fix
dan [Wed, 24 Jun 2026 13:37:31 +0000 (13:37 +0000)] 
Remove a stray C++ style comment left in build.c by the previous commit on this branch.

FossilOrigin-Name: bfce01a4b06b5f3bfb050bf15e25919a6c85b3ec0002acd016ac8c5ffa500daf

2 weeks agoDefend against integer overflow on oversized string inputs to
drh [Wed, 24 Jun 2026 12:40:26 +0000 (12:40 +0000)] 
Defend against integer overflow on  oversized string inputs to
sqlite3_mprintf() and similar C-language interfaces when using
the "%!.*s" conversion.  The problem is not reachable from SQL
due to string length restrictions in SQL. C-code is required.
[bugs:/info/2026-06-24T11:57:36Z|Bug 2026-06-24T11:57:36Z].

FossilOrigin-Name: 15a6482300bb2804fbfad1f07d6d74da6c0cb5953d44b74bc61c17d29e29821c

2 weeks agoBack out [23936786e6] because [9725b513c0] obviates it.
stephan [Wed, 24 Jun 2026 12:23:29 +0000 (12:23 +0000)] 
Back out [23936786e6] because [9725b513c0] obviates it.

FossilOrigin-Name: ef5e415303aeeaad65987871302380e96704316daf89ab5e96330798e4cbe1ce

2 weeks agoUpdate documentation to explain that a odd nByte parameter to
drh [Wed, 24 Jun 2026 12:22:22 +0000 (12:22 +0000)] 
Update documentation to explain that a odd nByte parameter to
sqlite3_prepare16() is undefined behavior.  In addition, always round
down the nByte parameter to an even number so that it in fact harmless
to give it an odd nByte value.
[bugs:/info/2026-06-24T11:25:24Z|Bug 2026-06-24T11:25:24Z].

FossilOrigin-Name: 7af7c501b60358cf84e843eb147e6edf9a5aaca30b1c570abe63ca68b54e3ec2

2 weeks agoFixes for SQLITE_OMIT_FLOATING_POINT.
drh [Wed, 24 Jun 2026 11:51:35 +0000 (11:51 +0000)] 
Fixes for SQLITE_OMIT_FLOATING_POINT.

FossilOrigin-Name: 9725b513c0b9fe488289ac42db59af29b62ac7551f5d1de5064147ec3ca4a2fa

2 weeks agoRevert the fixes to backup in [1f940357f7] and [e5db80350c] and instead fix the probl...
dan [Wed, 24 Jun 2026 11:50:08 +0000 (11:50 +0000)] 
Revert the fixes to backup in [1f940357f7] and [e5db80350c] and instead fix the problem reported by forum post [forum:15d82885e2 | 15d82885e2] (that a call to sqlite3_deserialize() after sqlite3_backup_init() but before the first call to sqlite3_backup_step() on the destination db of a backup could cause a crash) by deferring caching the pointer to the destination Btree until after it is locked. This addresses bug [bugs:/info/2026-06-24T08:41:13Z | 2026-06-24T08:41:13Z].

FossilOrigin-Name: 44a0f396daa13f382fd839cd8be49148aa24114968b97fed7f365307d1f8280a

2 weeks agoSwap two lines to get the amalgamation building again with SQLITE_OMIT_FLOATING_POINT...
stephan [Wed, 24 Jun 2026 10:22:36 +0000 (10:22 +0000)] 
Swap two lines to get the amalgamation building again with SQLITE_OMIT_FLOATING_POINT, noting that neither the shell nor the canonical library build with that flag. Reported in [forum:8c3df4da0d|forum post 2026-06-24T07:21:05Z].

FossilOrigin-Name: 23936786e680131af644510eb50b7ad20ee39221d1fb29732dea76483aed2273

2 weeks agoAdd vtab to the list of supported omit-api=X options and teach tester1 to gracefully...
stephan [Wed, 24 Jun 2026 09:32:55 +0000 (09:32 +0000)] 
Add vtab to the list of supported omit-api=X options and teach tester1 to gracefully handle that.

FossilOrigin-Name: e4a350e6846f35c4b7b1501d702f4d8337cbf285df8c37416e8db5a7dba5b6f0

2 weeks agoHave the npm target forward the omit-api flag to its sub-make. Doc typo fixes.
stephan [Wed, 24 Jun 2026 09:19:01 +0000 (09:19 +0000)] 
Have the npm target forward the omit-api flag to its sub-make. Doc typo fixes.

FossilOrigin-Name: c65153b28f8a7fcf5eec96032b4f030e6f698ed7d5c1ab479462b4e36ab89c55

2 weeks agoTeach the JS build to filter out various APIs/VFSes when passed omit-api='api names...
stephan [Wed, 24 Jun 2026 09:09:02 +0000 (09:09 +0000)] 
Teach the JS build to filter out various APIs/VFSes when passed omit-api='api names...'. Fully trimmed this saves just shy of 300kb from the JS. Make loud=1 mode distinctly louder when preprocessing.

FossilOrigin-Name: 2603c855795fc9466522b1e10433efd5e30975e68ee891680f27f06f3189390b

2 weeks agoAdd preprocessor guards to various JS files working towards the ability to build...
stephan [Tue, 23 Jun 2026 20:42:48 +0000 (20:42 +0000)] 
Add preprocessor guards to various JS files working towards the ability to build, e.g., with only one of various VFSes included. The makefile does not yet integrate these - this is an incremental step towards addressing the discussion in [https://github.com/sqlite/sqlite-wasm/pull/168|the downstream npm project's PR#168].

FossilOrigin-Name: f6618a693b7b71f4b846fac257100d3a516dcda687b039d24bcaf29dd1c7454b

2 weeks agoMerge the fixes for the use-after-free problem caused by executing an ATTACH when...
dan [Tue, 23 Jun 2026 20:12:17 +0000 (20:12 +0000)] 
Merge the fixes for the use-after-free problem caused by executing an ATTACH when a backup operation was active, and for the OOB read in the unused spellfix1 extension.

FossilOrigin-Name: e458ed9cc9d46dfdade3b4e99eb209d8aefd40a245e002d68df1813f9f99e2d7