]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
4 days agoUpdate new test in zipfile.test so that it does not run if SQLITE_MAX_LENGTH is too... zipfile-buffer-overrun
dan [Mon, 1 Jun 2026 11:50:55 +0000 (11:50 +0000)] 
Update new test in zipfile.test so that it does not run if SQLITE_MAX_LENGTH is too small.

FossilOrigin-Name: cc86820e198db6ee4e62f455d3dd9877d73873aaccad6ceffd0b34452d35c89c

4 days agoFix an integer overflow that could lead to a buffer overrun in the zipfile extension...
dan [Mon, 1 Jun 2026 10:56:11 +0000 (10:56 +0000)] 
Fix an integer overflow that could lead to a buffer overrun in the zipfile extension. Bug [bugs:/info/2026-06-01T10:16:47Z | 2026-06-01T10:16:47Z].

FossilOrigin-Name: 7c740d2cfd22a89258be2221860ca10985f0fc16dc7a17a99fc282d7105dc38e

4 days agoExtra defenses against integer overflows in the untested, unused, and
drh [Mon, 1 Jun 2026 10:53:28 +0000 (10:53 +0000)] 
Extra defenses against integer overflows in the untested, unused, and
unsupported transliterate() SQL extension function found in the
ext/misc/spellfix.c extension.
[bugs:/info/2026-06-01T10:34:57Z|Bug 2026-06-01T10:34:57Z].

FossilOrigin-Name: 2b073519b6080abc8872b0728c64827cc088d1b43f132cd2aeb396f06de3d36f

4 days agoFix the carray virtual table so that it gives no solution if it cannot
drh [Sun, 31 May 2026 19:41:16 +0000 (19:41 +0000)] 
Fix the carray virtual table so that it gives no solution if it cannot
find a usable first parameter.  dbsqlfuzz find.

FossilOrigin-Name: 3c0a277e6741c72281e12c44d85902aa6780890a7f59bacc3ac2b35ba27f7211

4 days agoTest case to cover the bug fix in the previous check-in.
drh [Sun, 31 May 2026 17:01:44 +0000 (17:01 +0000)] 
Test case to cover the bug fix in the previous check-in.

FossilOrigin-Name: 5b28d49b61d5edc9fef896e685bf227b7e1716c0cc666fd2ebe0d5ea0d11af06

4 days agoFix the zipfile extension so that ZIP archives containing files whose names
drh [Sun, 31 May 2026 15:49:57 +0000 (15:49 +0000)] 
Fix the zipfile extension so that ZIP archives containing files whose names
contain embedded \000 bytes do not cause problems.
[bugs:/info/2026-05-31T11:43:05Z|Bug 2026-05-31T11:43:05Z].

FossilOrigin-Name: c12ff342a90c61a0a82c8e63d2d94fecec10dff498da666873ff6aaa15c23dfd

5 days agoFiddle should default to using NO_COLOR since the JS console does not
drh [Sun, 31 May 2026 09:38:28 +0000 (09:38 +0000)] 
Fiddle should default to using NO_COLOR since the JS console does not
support ANSI X3.64.

FossilOrigin-Name: bde6190fdeb530bfb92524ab5542f3f4b64adf31c31de1e00fe4430a8e00411f

5 days agoFix the format() SQL function so that it reports TOOBIG and NOMEM errors.
drh [Sun, 31 May 2026 09:18:31 +0000 (09:18 +0000)] 
Fix the format() SQL function so that it reports TOOBIG and NOMEM errors.
Fix a possible integer overflow on %#Q formatting.
[bugs:/info/2026-05-31T02:00:07Z|Bug 2026-05-31T02:00:07Z].

FossilOrigin-Name: 3bfe0510aecccf113b9d008c308fca3096e9c45c59b919c0b91bb4703415988f

6 days agoAdd a test to ensure an application does not try to create a geopoly
drh [Sat, 30 May 2026 13:23:25 +0000 (13:23 +0000)] 
Add a test to ensure an application does not try to create a geopoly
virtual table with too many columns.
[bugs:/info/2026-05-30T12:47:27Z|Bug 2026-05-30T12:47:27Z].

FossilOrigin-Name: 2c605bfb1562d7a3609ad6ffd7446def12f1ac7084e41b9c6723e998c156501d

6 days agoHarden the diskused.c extension against NULL pointer deferences that
drh [Sat, 30 May 2026 10:24:03 +0000 (10:24 +0000)] 
Harden the diskused.c extension against NULL pointer deferences that
might have previously occurred when given a corrupt database file.
[bug:/info/2026-05-30T07:08:55Z|Bug 2026-05-30T07:08:55Z].

FossilOrigin-Name: 7487a1c59d3aaea9f8b2569dca76bbccf21948b1e7bd8a1d841e04382db696f4

6 days agoRemove the untested and undocumented "scrub" utility program. It was written
drh [Sat, 30 May 2026 10:09:33 +0000 (10:09 +0000)] 
Remove the untested and undocumented "scrub" utility program.  It was written
in 2016, but made obsolete by the [VACUUM INTO] command in 2019.

FossilOrigin-Name: 27d67fb175e839f6e7450f54166b52e0a6137c075758511da32fd82c57c310c4

6 days agoBe sure to do floating-point to text conversions in JSON to the full
drh [Fri, 29 May 2026 23:14:22 +0000 (23:14 +0000)] 
Be sure to do floating-point to text conversions in JSON to the full
17-digits.

FossilOrigin-Name: 61a776650cdc3fe632bdb1dc39f50f542b00a9e5b468180eb54b69750d0cd70c

6 days agoRename the ext/misc/analyze.c extension to ext/misc/diskused.c, to avoid
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".

FossilOrigin-Name: c7839f7a1749b38f8a36c06d93a7b59095e91ce753e8dd020de273ca8f73a239

7 days agoThe -csv option to the CLI also sets "-limits off", for legacy
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].

FossilOrigin-Name: d15cd64160192119a5f12afec14dbfbb30fb38a8557cb9dc559b3f061c15687a

8 days agoAvoid a resource leak in an error path in the icu extension.
dan [Thu, 28 May 2026 11:29:05 +0000 (11:29 +0000)] 
Avoid a resource leak in an error path in the icu extension.

FossilOrigin-Name: 87c37dab7e53d1bd891f3fed624963b35ab15a785706d0964b5d07ab70421c10

8 days agoFix an infinite loop that can occur in the unused, untested, and
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].

FossilOrigin-Name: 646e9b49153ebd7e09e3ef72cc4f64fb685d0cfd8b158ef7d11d37c50c3f0b7e

8 days agoFix a problem with shell tool function analyze() and schema objects with name contain...
dan [Thu, 28 May 2026 11:12:29 +0000 (11:12 +0000)] 
Fix a problem with shell tool function analyze() and schema objects with name containing "%"  characters.

FossilOrigin-Name: c6d5793d5d2212c979e2fe5eb12c3844bfc1f2029bd8d076fec030a04f6d4bb5

8 days agoFix potential integer overflow in btree overflow page cache computation,
drh [Thu, 28 May 2026 10:14:25 +0000 (10:14 +0000)] 
Fix potential integer overflow in btree overflow page cache computation,
reported by Project Fortify.  Test cases in TH3.

FossilOrigin-Name: dfa674d6e6bffdb930dbefa767831db7862c322b6d3c7a6322f0fa0f087aaaf9

9 days agoPatch test/indexexpr1.test to work when built with SQLITE_DQS=0. Addresses [forum...
stephan [Tue, 26 May 2026 19:25:36 +0000 (19:25 +0000)] 
Patch test/indexexpr1.test to work when built with SQLITE_DQS=0. Addresses [forum:2026-05-26T18:08:20Z|forum post 2026-05-26T18:08:20Z].

FossilOrigin-Name: b470a5d69e70d3440467e7792231f8556111d2c1126cf62879bbfd214ac0a9e0

9 days agoFix an OOM check in shell.c.in. Addresses [forum:2026-05-26T15:02:35Z|forum post...
stephan [Tue, 26 May 2026 17:15:54 +0000 (17:15 +0000)] 
Fix an OOM check in shell.c.in. Addresses [forum:2026-05-26T15:02:35Z|forum post 2026-05-26T15:02:35Z].

FossilOrigin-Name: e78198e6aec57c28e33a5b1c5ae9943115a35d2fbfa04c8428318567f17eefbe

9 days agoFix a potential 1-byte overread in sqlite3changeset_invert() when processing a corrup...
dan [Tue, 26 May 2026 15:03:30 +0000 (15:03 +0000)] 
Fix a potential 1-byte overread in sqlite3changeset_invert() when processing a corrupt buffer.

FossilOrigin-Name: 78eaa605cb6c14e5bd49a898b4c737957bd60c8714913cc2341f4ffe3bfe81fe

10 days agoFix a 32-bit integer overflow in sqlite3changegroup_change_blob() that could lead...
dan [Tue, 26 May 2026 14:18:50 +0000 (14:18 +0000)] 
Fix a 32-bit integer overflow in sqlite3changegroup_change_blob() that could lead to a buffer overwrite.

FossilOrigin-Name: 8a289158e2baeee8aa5e601bde46b0482361064ede09e4108f519270efdd5f69

10 days agoFix QRF so that it works sensibly with "--wrap 1"
drh [Tue, 26 May 2026 13:54:57 +0000 (13:54 +0000)] 
Fix QRF so that it works sensibly with "--wrap 1"

FossilOrigin-Name: 48f950b2a1ef841d915ca733baf324a1af98e644b660f238dd5018015340a6c6

10 days agoStrength the defense against malicious command-line arguments in the
drh [Tue, 26 May 2026 11:23:00 +0000 (11:23 +0000)] 
Strength the defense against malicious command-line arguments in the
sqlite3_rsync utility program.

FossilOrigin-Name: c84d596b6da22061627282d444913c88dc2f9bd82e86957183f7e732f2713b33

10 days agoFix HTML ">" quoting in QRF.
drh [Mon, 25 May 2026 23:44:37 +0000 (23:44 +0000)] 
Fix HTML ">" quoting in QRF.
[bugs:/forumpost/f72dfbdeff|Bug f72dfbdeff].

FossilOrigin-Name: 5cee1097b47d850989ebecdb9d2c814e6968240fe3bacb5598ca85067cb95692

10 days agoFix a minor problem with test case mjournal-3.3.
drh [Mon, 25 May 2026 20:45:43 +0000 (20:45 +0000)] 
Fix a minor problem with test case mjournal-3.3.

FossilOrigin-Name: 80093dc0610438cd506d230eca12e699e05395aecb8048c5bc066379b927e8bb

10 days agoEarly malformed JSON errors in json_each() and json_tree() to prevent
drh [Mon, 25 May 2026 19:47:58 +0000 (19:47 +0000)] 
Early malformed JSON errors in json_each() and json_tree() to prevent
excess output.

FossilOrigin-Name: eb4d7e1b86b1d1bece01f621c9991a11f4812bf515a973b5036b09a1392134e2

10 days agoFix to testrunner.tcl so that it will run on FreeBSD.
drh [Mon, 25 May 2026 19:32:52 +0000 (19:32 +0000)] 
Fix to testrunner.tcl so that it will run on FreeBSD.
[forum:/info/2026-05-25T18:50:36Z|Forum post 2026-05-25T18:50:36Z]

FossilOrigin-Name: 97b66687b3f772e225e1792194a7f54a2ae187c84de1d76227846503631b5c2f

10 days agoEnhance the defenses against malformed JSONB in the jsonbPayloadSize()
drh [Mon, 25 May 2026 18:46:42 +0000 (18:46 +0000)] 
Enhance the defenses against malformed JSONB in the jsonbPayloadSize()
routine.

FossilOrigin-Name: 32c9f71a989fa4c81a613398ca5c1e68eb88b2a90ac4a4a7bf39e755717f43b1

10 days agoUse "-encoding iso8859-1" instead of "-encoding binary" in mjournal.test so that...
dan [Mon, 25 May 2026 18:14:58 +0000 (18:14 +0000)] 
Use "-encoding iso8859-1" instead of "-encoding binary" in mjournal.test so that the script works with both Tcl 8 and 9.

FossilOrigin-Name: 897b443fb35d550891315890a5af473d347af3b6ecea11fcafafb5b06a1b50a5

10 days agoFix a potential 1 byte overwrite that could occur when processing a carefully crafted...
dan [Mon, 25 May 2026 17:58:07 +0000 (17:58 +0000)] 
Fix a potential 1 byte overwrite that could occur when processing a carefully crafted super-journal file.

FossilOrigin-Name: b3766c3afd0ac4d31f158ee5938f19d72a047872e422b5f19b1567c60640f54d

10 days agoFix a potential buffer overwrite that could occur when in fts5 when handling corrupt...
dan [Mon, 25 May 2026 17:09:37 +0000 (17:09 +0000)] 
Fix a potential buffer overwrite that could occur when in fts5 when handling corrupt records.

FossilOrigin-Name: de009593f692251c4a033742b1e79c4ddb5ddcb174209d58c4d1bea19ceb360c

13 days agoMake the /A substitution in the CLI prompt expansion responsive to the
drh [Sat, 23 May 2026 12:14:05 +0000 (12:14 +0000)] 
Make the /A substitution in the CLI prompt expansion responsive to the
SQLITE_CLI_APPNAME compile-time option.

FossilOrigin-Name: 624dc12e9e6dece22f7d247b66f0889755295cb2154502ade6553c13b8fecd83

13 days agoStrengthen the statement about not accepting agentic code.
drh [Fri, 22 May 2026 17:51:15 +0000 (17:51 +0000)] 
Strengthen the statement about not accepting agentic code.

FossilOrigin-Name: 64b707f4b3177384b611df5f5e4ca7da44d86313f74ff943a00581a6dd924b08

2 weeks agoUpdate the session module so that it can apply changesets containing two or more...
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.

FossilOrigin-Name: 32c762bbb187e3bc964dcaad0949ebeb4da21331be842a5868feeac6088790ca

2 weeks agoAdd the SQLITE_CHANGESETAPPLY_NOUPDATELOOP option to the sqlite3_changeset_apply_v2... session-update-loops
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.

FossilOrigin-Name: eba02092bcf1713a646ecf8febd53a83bc803cf1b17e2e4fc590c14d886a8d27

2 weeks agoAdd a prototype AGENTS.md file
drh [Fri, 22 May 2026 11:15:25 +0000 (11:15 +0000)] 
Add a prototype AGENTS.md file

FossilOrigin-Name: 3dd1181120b9910a96090b5b3cad5f0829fadeffeb6ffaad17031540a5749513

2 weeks agoFix the VFSes so that there is no 32-bit integer overflow in the
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].

FossilOrigin-Name: 9ac4a33a2932d353c4871fd8e09c10addf827f1fc3fc9380037d738cf2cd0353

2 weeks agoMerge latest trunk changes with this branch.
dan [Thu, 21 May 2026 15:13:17 +0000 (15:13 +0000)] 
Merge latest trunk changes with this branch.

FossilOrigin-Name: c6226d508d6af28fcd42fecd482014c3e284923871d3d8f5177f728cbf3457c5

2 weeks agoFix a buffer overread in the session module that could occur when processing a corrup...
dan [Thu, 21 May 2026 14:58:36 +0000 (14:58 +0000)] 
Fix a buffer overread in the session module that could occur when processing a corrupt changeset.

FossilOrigin-Name: 869a51ae84dfaaf824c872e4b3024f35eea7fa67bb584759a2d42ebf8404ef6e

2 weeks agoPerformance optimization to the sqlite3ExprCollSeqMatch() routine.
drh [Thu, 21 May 2026 14:48:43 +0000 (14:48 +0000)] 
Performance optimization to the sqlite3ExprCollSeqMatch() routine.

FossilOrigin-Name: 035f1d2f284a081e6aef01cc773a3784458ec8e6297f3fbf4063670a9e65278c

2 weeks agoRemove dead code created by [20c2f8ce9242c3db].
drh [Thu, 21 May 2026 14:16:47 +0000 (14:16 +0000)] 
Remove dead code created by [20c2f8ce9242c3db].

FossilOrigin-Name: 68c5fd5fa0f986b782519472398b068ba7c295c56a0e0199b8e0509d0d1685fb

2 weeks agoLimit the length of inputs to the spellfix1_editdist() extension
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].

FossilOrigin-Name: 51ebf0e04efcbe982e62f2228553700b8c1147a37c70fdfaa0e377184b3ac936

2 weeks agoA join constraint is not an equivalence unless both operands have the
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.

FossilOrigin-Name: 20c2f8ce9242c3dbb8054f01c6c7338763c830b7c1491a99c8e1de98ce8f0a5b

2 weeks agoEnhance the xfer-optimization to verify access to the source table using
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].

FossilOrigin-Name: d1cdb817cafd03a4081b254a71672ba07e5b637994d3f2f925532f17af0a67dc

2 weeks agoImproved entropy collection on Windows.
drh [Wed, 20 May 2026 20:03:07 +0000 (20:03 +0000)] 
Improved entropy collection on Windows.

FossilOrigin-Name: b734b76af3f732e0db8a002781bae57aa7a01c4a7f5151605144a6aeef993a21

2 weeks agoFix a bug causing the session module to dereference a NULL pointer when applying...
dan [Wed, 20 May 2026 15:06:34 +0000 (15:06 +0000)] 
Fix a bug causing the session module to dereference a NULL pointer when applying a corrupt changeset.

FossilOrigin-Name: e807d4e3798efd532b3d78d1dfe513ed4fbd3cb793dd0ae5c30cae6031422b10

2 weeks agoCheck-in [7cf841f3613c8302] was incomplete in that it did not remove
drh [Wed, 20 May 2026 11:53:15 +0000 (11:53 +0000)] 
Check-in [7cf841f3613c8302] was incomplete in that it did not remove
the incorrect assert() statement.  Fixed here.

FossilOrigin-Name: c19bacca13f699953bbf50afb867035a94080b8a48111cf3d87bced880a3e620

2 weeks agoAvoid returning an SQLITE_SCHEMA error from within sqlite3session_diff() if the schem...
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>.

FossilOrigin-Name: 20110547a117912be68d91bc006e92c45beffde16c6bcdf062bf8971c9a9a864

2 weeks agoFix a test case added by [1249eeb1b9759038] that does not work for
drh [Wed, 20 May 2026 01:32:30 +0000 (01:32 +0000)] 
Fix a test case added by [1249eeb1b9759038] that does not work for
the config=prepare permutation.

FossilOrigin-Name: 6aaeeffc2c7abbe32050da40bcbffc5f8d596e6df4603b8f8f23294f2465f25e

2 weeks agoImprovements to testrunner.tcl: Make C-program tests responsive to the
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.

FossilOrigin-Name: 3f409c0e1be6b71eca92eccf0b9de3ef5923a6a57be49540ebe190fc6a6d06d4

2 weeks agoFix a potential buffer overread in fts5 that could occur when handling corrupt records.
dan [Tue, 19 May 2026 20:27:54 +0000 (20:27 +0000)] 
Fix a potential buffer overread in fts5 that could occur when handling corrupt records.

FossilOrigin-Name: 70021c3291b38192832c99fa4d8155249dd39f5b26334595c71f5cee66d13ebb

2 weeks agoSilently ignore nested porter tokenizers in FTS5. Having nested porter
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].

FossilOrigin-Name: 0bdeedf56c9d7209d1ea8f950d0ef03c78cbf677528d9d30c5f4ec48c4e1a571

2 weeks agoRemove new unreachable code from this branch.
dan [Tue, 19 May 2026 18:58:59 +0000 (18:58 +0000)] 
Remove new unreachable code from this branch.

FossilOrigin-Name: 07f81e256fde5796c0d8bcedff8fad4368639386f40881c0844e9c86a69b6fad

2 weeks agoPrevent integer overflow in the ICU extension.
drh [Tue, 19 May 2026 18:56:11 +0000 (18:56 +0000)] 
Prevent integer overflow in the ICU extension.
[bugs:/forumpost/844bdd7d5c|Bug report 844bdd7d5c].

FossilOrigin-Name: c20cb75ca07d0553d7a847c65a40efb2e5c587579ec32b02121a8963c70db12f

2 weeks agoFix an assertion fault that can occur in RTree given a carefully
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].

FossilOrigin-Name: 7cf841f3613c8302a419638bdec83b1b9799f00cfedbfe40dca0a1a005c196b5

2 weeks agoFix problems with error handling when applying changesets with update loops.
dan [Tue, 19 May 2026 18:28:03 +0000 (18:28 +0000)] 
Fix problems with error handling when applying changesets with update loops.

FossilOrigin-Name: f797925df05f1a53392dba416aa72067716bb6e38ebc679d313f8a98f89c5913

2 weeks agoMerge trunk changes into this branch.
dan [Tue, 19 May 2026 17:15:05 +0000 (17:15 +0000)] 
Merge trunk changes into this branch.

FossilOrigin-Name: e480e126fc1550948bd1a3635f0e3a862353dcd8b0f1921ab6e66d699110b477

2 weeks agoAvoid a potential 1 byte overread in sqlite3changegroup_add() when processing a corru...
dan [Tue, 19 May 2026 17:12:39 +0000 (17:12 +0000)] 
Avoid a potential 1 byte overread in sqlite3changegroup_add() when processing a corrupt changeset buffer.

FossilOrigin-Name: 4d8c3a2919dc942a0a044ec7582a688e0f93e91f4a465bb94390fbe3ad1b50b4

2 weeks agoAdd an sqlite3FaultSim() call to the changes at [6193e4105b6a58ea] to
drh [Tue, 19 May 2026 17:05:28 +0000 (17:05 +0000)] 
Add an sqlite3FaultSim() call to the changes at [6193e4105b6a58ea] to
make them testable.

FossilOrigin-Name: 0de3d95500b7ecd41a09d81f176c1510896e811b3e468e1cf50f752305fdb06f

2 weeks agoMerge latest trunk changes into this branch.
dan [Tue, 19 May 2026 16:07:22 +0000 (16:07 +0000)] 
Merge latest trunk changes into this branch.

FossilOrigin-Name: 1f71b530c9e8ddce5b25ed0971447cd925f9194afc7a2f929429318a5fcb5a72

2 weeks agoFix a incorrect assert() from [52dd437d51d3c1af] reported by OSSFuzz.
drh [Tue, 19 May 2026 16:07:08 +0000 (16:07 +0000)] 
Fix a incorrect assert() from [52dd437d51d3c1af] reported by OSSFuzz.

FossilOrigin-Name: 64b49e4d431d35db0920c7fc8a89d38ce2d2d2dbf42a7caf76aaa9685d66601b

2 weeks agoAdd the "make" subcommand to testrunner.tcl
drh [Tue, 19 May 2026 15:13:03 +0000 (15:13 +0000)] 
Add the "make" subcommand to testrunner.tcl

FossilOrigin-Name: 00d546812810252a4d51ff796931dc2ff5bdd5173ddb8f95fb5efccd897087ff

2 weeks agoEarly detection of attempts to overwrite an in-use cache page due
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].

FossilOrigin-Name: 6193e4105b6a58eac2bc17c5b2d55fdae332816b59beed1fe24c15dff1372322

2 weeks agoSecurity enhancements to the untested and unused fossildelta.c extension.
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].

FossilOrigin-Name: 2d3fbbe421d3b0ad8fa08255fd30af7f2d947919ebb90fa9c9c4ee72ffd880b4

2 weeks agoLimit the size of input strings to the (disused) spellfix extension
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].

FossilOrigin-Name: 4b16b80cf2e26c41f0828d65883145dc81c0987110c3f04a864cec43e7c418e5

2 weeks agoFix a NULL pointer dereference in the obscure (and unused) prefixes
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].

FossilOrigin-Name: 4880adc053b0f21633936347fd5610e4338b15da39607d8ba5a6b32d1516e8cb

2 weeks agoFix an off-by-one error in matchinfo('b') for FTS3 when there are a large
drh [Mon, 18 May 2026 21:45:06 +0000 (21:45 +0000)] 
Fix an off-by-one error in matchinfo('b') for FTS3 when there are a large
number of columns.
[bugs:/forumpost/42d5f799d1|Bug report 42d5f799d1].

FossilOrigin-Name: c0f2cd6d292bb3554539a309a2ecfa0a12f0248cfcbb5594391607b107a62cd2

2 weeks agoLimit the NEAR span in FTS3 to 1 billion, to avoid integer overflow.
drh [Mon, 18 May 2026 20:43:15 +0000 (20:43 +0000)] 
Limit the NEAR span in FTS3 to 1 billion, to avoid integer overflow.
[bugs:/forumpost/4cfcf164d2|Bug report 4cfcf164d2].

FossilOrigin-Name: adcb44f9dcfd34df4cf4f5cc418ecac9f2ca09723442379dfedcba532c45de77

2 weeks agoFix a problem applying changesets that contain multiple UPDATE constraint loops.
dan [Mon, 18 May 2026 20:34:56 +0000 (20:34 +0000)] 
Fix a problem applying changesets that contain multiple UPDATE constraint loops.

FossilOrigin-Name: 8e89aafab1b8fa7d59ac98c39b7f1c1cc23a98ba868a5dac83dee63688786a3f

2 weeks agoPrevent integer overflow due to database corruption in.
drh [Mon, 18 May 2026 20:27:57 +0000 (20:27 +0000)] 
Prevent integer overflow due to database corruption in.
fts3auxNextMethod().
[bugs:/forumpost/bce19272cf|Bug report bce19272cf].

FossilOrigin-Name: d903795e3bdf91607f23dace5a15a070139b32e34aed8540a6c2e19c39e997be

2 weeks agoWhen a subquery is an argument to an SQLITE_SUBTYPE function, then set
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].

FossilOrigin-Name: d75c08c8416bde3f510a135ea07cc217ba6183eacda6ba895bccbf57efe9284f

2 weeks agoUpdate the session module so that it can apply changesets containing two or more...
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.

FossilOrigin-Name: 5f8010599fb33fbe1dadc894a679056a5d38040ab4f09772cd59827941e9348b

2 weeks agoFix the window-function variant of the json_group_object() function so
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].

FossilOrigin-Name: ac3a958b0ab7766544bb406aa990668d2235ab26fb68c75ded3f71273d97b18c

2 weeks agoDo not attempt the OR-optimization on conjuncts that contain COLLATE
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.

FossilOrigin-Name: 622882529558b4779dfb7246bd5a9de776555c8f940bb941397fb56fb9f97e43

2 weeks agoFix a harmless compiler warning caused by [460243ee4c28873d].
drh [Mon, 18 May 2026 11:44:09 +0000 (11:44 +0000)] 
Fix a harmless compiler warning caused by [460243ee4c28873d].

FossilOrigin-Name: e076ac7b648988b48b546e19b5ef2e50061b44c85bc2645362409e295e3b4b11

2 weeks agoCorrection to the bugfix at [212c68249cc0e890] so that it works
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].

FossilOrigin-Name: 49a3c6ade45ea31187ac8dbba0452fcad487e76f2219bfa6435feab545b5f632

2 weeks agoRaise an error in the dbpage virtual table if the page number on an insert
drh [Mon, 18 May 2026 10:19:14 +0000 (10:19 +0000)] 
Raise an error in the dbpage virtual table if the page number on an insert
is too large. [bugs:/forumpost/f363b34881|Bug report f363b34881].

FossilOrigin-Name: 2bbc8f1404e3cbaa8fe24e2ea2d774daf2bf3b232fbd8978a1a37e4f8f0f629d

2 weeks agoAdd a reference to the new sqlite.org/bugs forum.
stephan [Mon, 18 May 2026 10:00:35 +0000 (10:00 +0000)] 
Add a reference to the new sqlite.org/bugs forum.

FossilOrigin-Name: f2fe7e7a184e482411ddf792a1964e6ce30a28185da9fa79488d097382c352fd

2 weeks agoFix the ".prompt" command so that it honors -bail.
drh [Sun, 17 May 2026 19:21:30 +0000 (19:21 +0000)] 
Fix the ".prompt" command so that it honors -bail.

FossilOrigin-Name: 5b58bdd33f0410624523fc8adc230db4e5f57283d234a5f0d26a2790629bc0f9

2 weeks agoFix the new %J and %j formats so they work correctly with a zero precision.
drh [Sun, 17 May 2026 17:50:32 +0000 (17:50 +0000)] 
Fix the new %J and %j formats so they work correctly with a zero precision.

FossilOrigin-Name: 428b924dd6e228c879338c5c5edbe68bdc4d8d8e80c37e3d070a8a34b57300c1

2 weeks agoFix the sqlite3_value_numeric_type() interface so that it works even if
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].

FossilOrigin-Name: 460243ee4c28873d5c484a91af7ec18d03d0e726b8bb4e1e680b588e5f371400

2 weeks agoIn the CLI, make the NO_COLOR prompt the same as the default prompt, only
drh [Sun, 17 May 2026 16:35:36 +0000 (16:35 +0000)] 
In the CLI, make the NO_COLOR prompt the same as the default prompt, only
without any color.

FossilOrigin-Name: cc05e9749c14d6ff4e396ad387c42d53b696680ce74ce6a92f6fb71ed9a53ae5

2 weeks agoWhen two tables are joined by USING, the affinity and collating sequence of
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).

FossilOrigin-Name: cbb6f72c10b1224088b9d604a0e014e7020e8d79a317ebb4af420ba3b72f40cc

2 weeks agoWhen two tables are joined by USING, the affinity of the join column can
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.

FossilOrigin-Name: 8cc0b52cca2d6b155b4b169e6f9de9e7d2dc61c40f89920c2b6bf86e549ab6f7

2 weeks agoFix false-negatives in the sqlite3ExprCanReturnSubtype() routine having
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].

FossilOrigin-Name: 9be94e961457967408cbd0acf11877fbb323a48eee405fff53755770f1b3261a

2 weeks agoImproved comment on sqlite3ExprCanReturnSubtype() as well as one very index-on-case-expr-subtype
drh [Sat, 16 May 2026 16:02:08 +0000 (16:02 +0000)] 
Improved comment on sqlite3ExprCanReturnSubtype() as well as one very
minor efficiency improvement.

FossilOrigin-Name: b57d6b76b0f9f4f154997af83f14d545bf2b6b8f7194746835e4c34885db227a

2 weeks agoWhen using an index on a CASE expression that may return a value with a subtype,...
dan [Fri, 15 May 2026 19:44:24 +0000 (19:44 +0000)] 
When using an index on a CASE expression that may return a value with a subtype, avoid discarding any subtype.

FossilOrigin-Name: 69c9a82cbaea7b6faa6a357dd884b1e0d2bc684d847efb31a2d64c75fabf5428

2 weeks agoHave window functions sum(), total() and avg() correctly handle the obscure case...
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.

FossilOrigin-Name: 614f8cbc374c7a2d39826706f16ab1c17e75abb420a70be356c7eefa95b271a5

2 weeks agoHave the sqlite_dbpage module correctly handle constraints of the form "WHERE pgno...
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.

FossilOrigin-Name: 350152d5124b71b3dd640c109dbac5f05a3a9583a335fbe25f707e1b754c1c74

3 weeks agoIf there is a WHERE clause constraint of the form "a=$var", then
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.

FossilOrigin-Name: 1249eeb1b9759038b6d10dcd8d65f64f81e8529b28e5e24f9fc5759e9a1c88a5

3 weeks agoHandle constraints like "a=$var" where the value bound to $var is -1, 0 or 1 in the... reprepare-a=var
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.

FossilOrigin-Name: 224e827e87ac8aa4b18ff9b2193decbdcd832579bf6b6e0883c03db90ebd5319

3 weeks agoHarden the QRF extension against integer overflow problems.
drh [Thu, 14 May 2026 13:29:59 +0000 (13:29 +0000)] 
Harden the QRF extension against integer overflow problems.

FossilOrigin-Name: 83d3a0d39b0b36a47003206d390935d4c94f7a906ada02f69e0ad1eef2f22d59

3 weeks agoIn QRF, relax the constraint on the screen width so that it can be as
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].

FossilOrigin-Name: 91439d95dc81adebf8226f2b7c33ca62a4b7163cfc14e03993524aa17b5767f3

3 weeks agoRaise an error if an ALTER TABLE ADD COLUMN statement tries to add
drh [Thu, 14 May 2026 11:35:17 +0000 (11:35 +0000)] 
Raise an error if an ALTER TABLE ADD COLUMN statement tries to add
a CHECK constraint that contains an internal-use-only SQL function.

FossilOrigin-Name: 52dd437d51d3c1af0777350daeebf1159033eede3f58fcc5ebaeaec8869ffaff

3 weeks agoCorrection to the documentation for sqlite3_uri_int64().
drh [Thu, 14 May 2026 10:36:50 +0000 (10:36 +0000)] 
Correction to the documentation for sqlite3_uri_int64().

FossilOrigin-Name: 58472fdab0691f7f03f15201542f15148ed7734bfeb495370386d666ae4beded

3 weeks agoFix the sqlite3changegroup_change_finish() API so that it correctly handles NULL...
dan [Wed, 13 May 2026 20:37:30 +0000 (20:37 +0000)] 
Fix the sqlite3changegroup_change_finish() API so that it correctly handles NULL being passed for the pzErr parameter.

FossilOrigin-Name: f81d6d7bc8943729f678a3b62921a96764b15b9cc11d8a5753e48210a1b59617

3 weeks agoAdditional changes to the Windows VFS to try to get the system to a point
drh [Wed, 13 May 2026 20:06:08 +0000 (20:06 +0000)] 
Additional changes to the Windows VFS to try to get the system to a point
where it will compile for UWP.

FossilOrigin-Name: 3ddc07110dacef98c14b852dcdc4f11d1c0f4061008bf3a61e2df707b0dc6c6b

3 weeks agoChange to compile-time option that omits non-UWP system calls to
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.

FossilOrigin-Name: b167c4c96e6a753952eb4be95d6283b50a9c59f4ecf59d60cf10d8de9cb115d8

3 weeks agoIn the Windows OS interface, use CreateFileMappingFromApp() and
drh [Wed, 13 May 2026 15:11:04 +0000 (15:11 +0000)] 
In the Windows OS interface, use CreateFileMappingFromApp() and
MapViewOfFilFromApp() if SQLITE_OS_WINRT is defined.

FossilOrigin-Name: 3c51436b43ab77b88134851a2773147b49a3c4fb5b0416db5e318b6e12d3b708