]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
5 weeks agoFix an integer overflow problem in fts3 that could lead to a buffer overwrite on...
dan [Wed, 3 Jun 2026 15:29:59 +0000 (15:29 +0000)] 
Fix an integer overflow problem in fts3 that could lead to a buffer overwrite on platforms where size_t is 32-bits. Bug [bugs:/info/2026-06-03T04:28:51Z | 2026-06-03T04:28:51Z].

FossilOrigin-Name: ef0c66d2a2e0b8f523633efca66a97236bb5a502525eb6a00a28a350ec7c76e6

5 weeks agoFix another buffer overread in fts5 that could occur when processing corrupt records...
dan [Wed, 3 Jun 2026 14:58:13 +0000 (14:58 +0000)] 
Fix another buffer overread in fts5 that could occur when processing corrupt records. Bug [bugs:/info/2026-06-03T03:54:40Z | 2026-06-03T03:54:40Z].

FossilOrigin-Name: b5337c87cc314e6830615e4efe2d4723fa7cedf87ce404f60d6e520aeab77cbc

5 weeks agoFix another potential buffer overrun that could occur in fts5 when processing corrupt...
dan [Wed, 3 Jun 2026 13:49:33 +0000 (13:49 +0000)] 
Fix another potential buffer overrun that could occur in fts5 when processing corrupt records.

FossilOrigin-Name: 6ee44b199512b8cac604bf062f893a9047af4b5bfc881bb7cb69ae42d0a0adb4

5 weeks agoFix a potential UAF bug in the zipfile extension.
drh [Wed, 3 Jun 2026 13:12:20 +0000 (13:12 +0000)] 
Fix a potential UAF bug in the zipfile extension.
[bugs:/info/2026-06-03T10:58:51Z|Bug 2026-06-03T10:58:51Z].

FossilOrigin-Name: 1fb5e9169ace6bea2bdf9013f39002c1ce5dc9ce51d6007bec22d91f456c15f0

5 weeks agoFix negative array index in "testing and debugging uses only" extension
drh [Wed, 3 Jun 2026 12:43:50 +0000 (12:43 +0000)] 
Fix negative array index in "testing and debugging uses only" extension
qpvtab.c.
[bugs:/info/2026-06-03T07:26:26Z|Bug 2026-06-03T07:26:26Z].

FossilOrigin-Name: d066699fcacd87496645f3aa3c4049935410ae2451879a033102304c80273deb

5 weeks agoAvoid excessive recursion and stack overflow in fts3 when processing a corrupt
dan [Wed, 3 Jun 2026 11:37:45 +0000 (11:37 +0000)] 
Avoid excessive recursion and stack overflow in fts3 when processing a corrupt
database.

FossilOrigin-Name: 21369378769195f20f839231f625582552eaa3f79044ca3e3efb7f9476b515a8

5 weeks agoThe prefix_length() function should stop at the first NUL terminator.
drh [Wed, 3 Jun 2026 11:07:47 +0000 (11:07 +0000)] 
The prefix_length() function should stop at the first NUL terminator.
[bugs:/info/2026-06-03T07:42:00Z|Bug 2026-06-03T07:42:00Z].

FossilOrigin-Name: a9b8bdea0683bb03015ea1ee38f75636c80c189eed4b786b6d3d654a831cfdfb

5 weeks agoMake the (unused, untested, and unsupported) ext/misc/compress.c routines
drh [Wed, 3 Jun 2026 10:55:08 +0000 (10:55 +0000)] 
Make the (unused, untested, and unsupported) ext/misc/compress.c routines
responsive to OOM conditions.
[bugs:/info/2026-06-03T08:28:36Z|Bug 2026-06-03T08:28:36Z].

FossilOrigin-Name: e3120e2a4339d51210645b14d075abba27dd97bd6bd6d42f445dd5baf3d337e3

5 weeks agoFix a case where sqlite3expert could be tricked into executing arbitrary SQL by a...
dan [Tue, 2 Jun 2026 15:20:37 +0000 (15:20 +0000)] 
Fix a case where sqlite3expert could be tricked into executing arbitrary SQL by a corrupt database schema.

FossilOrigin-Name: 8a633070e62bdc83a7cf895fd1a22c04b13579659df7cee9584d95096bfffab1

5 weeks agoAdd extra test case to zipfile.test. No code changes.
dan [Tue, 2 Jun 2026 11:11:02 +0000 (11:11 +0000)] 
Add extra test case to zipfile.test. No code changes.

FossilOrigin-Name: 83fe72bcdf866bdaf3043ae5b0c1eb45a9d50a01b24b7a531858271dd746baab

5 weeks agoFix the CLI so that it works when compiled using STDCALL on
drh [Tue, 2 Jun 2026 10:08:30 +0000 (10:08 +0000)] 
Fix the CLI so that it works when compiled using STDCALL on
Microsoft x86.  Change should not affect other platforms.
[forum:/info/2026-06-02T09:44:12Z|Forum 2026-06-02T09:44:12Z].

FossilOrigin-Name: 83adece349aed73b8d0a3aec141213ea329150eb529f4fd9774ca157b49d02fc

5 weeks agoEnhance PRAGMA integrity_check so that it better detects incorrect
drh [Mon, 1 Jun 2026 20:02:17 +0000 (20:02 +0000)] 
Enhance PRAGMA integrity_check so that it better detects incorrect
header sizes at the beginning of cells.

FossilOrigin-Name: 08bb2878e7575ab069f8f132537880a47a4d4543a1ac8bffc55e32488223245c

5 weeks agoDisable transitive WHERE constraints when there are explicit COLLATE operators. Fix...
dan [Mon, 1 Jun 2026 18:01:13 +0000 (18:01 +0000)] 
Disable transitive WHERE constraints when there are explicit COLLATE operators. Fix for report [bugs:/info/ffddcd3617 | 2026-05-31T08:33:10Z].

FossilOrigin-Name: 18ee3a17c589cfd34500b6a6547d0cb51aea4dd14b4e1e4b2d0cf0dbfb32378e

5 weeks agoMinor performance improvement for the patch on this branch. transitive-where-collate-bugs
dan [Mon, 1 Jun 2026 17:56:11 +0000 (17:56 +0000)] 
Minor performance improvement for the patch on this branch.

FossilOrigin-Name: 2702fecc5c47704bdae535459e59260b55c571ff3b7d09617541e36829d4cf9c

5 weeks agoFix minor problems surrounding transitive WHERE constraints and explicit COLLATE...
dan [Mon, 1 Jun 2026 17:40:23 +0000 (17:40 +0000)] 
Fix minor problems surrounding transitive WHERE constraints and explicit COLLATE terms.

FossilOrigin-Name: 9500238a1d603a3f08a8fc0954725d5d217aab339720146ea0bc700e47b81c3c

5 weeks agoMake sure the authenticator is called for columns that are part of
drh [Mon, 1 Jun 2026 16:49:39 +0000 (16:49 +0000)] 
Make sure the authenticator is called for columns that are part of
a USING in a FULL JOIN.
[bugs:/info/2026-05-31T02:00:37Z|Bug 2026-05-31T02:00:37Z].

FossilOrigin-Name: 4ef88a36f9d9669b0d74c58f79ad497803885ff6078e5f9685f13c96eab397cc

5 weeks agoFor expressions of the form "(x, y...) IN (SELECT a, b ...)" where the result is...
dan [Mon, 1 Jun 2026 16:20:40 +0000 (16:20 +0000)] 
For expressions of the form "(x, y...) IN (SELECT a, b ...)" where the result is not true, consider the collation sequences of columns "a" and "b" when determinining if the result should be false or NULL. Bug report [bugs:/info/0785f45e67 | 2026-05-31T02:10:44Z].

FossilOrigin-Name: 04d7a9d788cf0bb811483baceb9142f67d4a2380d4af409d5300a92f7972472e

5 weeks agoBetter handle a (possibly) potential buffer overrun in fts5. Based on the report...
dan [Mon, 1 Jun 2026 15:03:53 +0000 (15:03 +0000)] 
Better handle a (possibly) potential buffer overrun in fts5. Based on the report in [bugs:/info/38e75aa4f9 | 2026-05-31T09:06:13Z].

FossilOrigin-Name: 9d0e39408075f22dd56ad5fb50ef458c0cd6a4ec234dd43b3a5f5e0ac4447b61

5 weeks agoRemove the data type ANY added to the shell's CSV exports in [aff74e71ea734e1a],...
stephan [Mon, 1 Jun 2026 13:14:48 +0000 (13:14 +0000)] 
Remove the data type ANY added to the shell's CSV exports in [aff74e71ea734e1a], as discussed in [forum:2ea4c50f69fc9829|forum post 2026-06-01T12:01:59Z].

FossilOrigin-Name: a6a347aec5ff33b24d877ac0f04018f4e93748361da62ed27b1abec77840963e

5 weeks agoDo not allow the argument to a table-valued function to reference a table
drh [Mon, 1 Jun 2026 12:36:28 +0000 (12:36 +0000)] 
Do not allow the argument to a table-valued function to reference a table
to its right, even if the SELECT is inside a common table expression.
This is a replacement for the fix at [3c0a277e6741c722].  Fix
for multiple dbsqlfuzz reports and probably also a fix
for [bugs:/info/b6c6fad96c|Bug 2026-06-01T07:23:11Z].

FossilOrigin-Name: d96271db6a3a44e50d1a977250c4cc14178612a6c838e7c51c5f79fda45ae19f

5 weeks agoTest case to show that the change fixes the original carray problem. right-ref-cte
drh [Mon, 1 Jun 2026 12:30:13 +0000 (12:30 +0000)] 
Test case to show that the change fixes the original carray problem.

FossilOrigin-Name: 8df6671ae8211b706b7d4f073c5166f0f41f3c11339bc4d28997e8a205a39545

5 weeks agoImprovements to sqlite3SelectCheckOnClauses() to be more accurate in
drh [Mon, 1 Jun 2026 12:19:30 +0000 (12:19 +0000)] 
Improvements to sqlite3SelectCheckOnClauses() to be more accurate in
identifying table-valued functions that references tables to the right.

FossilOrigin-Name: e5bae3687dbb470ead7e8d6bf428b1fbb1e9f10c214bc2a91e93e68fb2ae6ff7

5 weeks agoBack out the recent change to carray. The intent is to fix this problem
drh [Mon, 1 Jun 2026 12:07:21 +0000 (12:07 +0000)] 
Back out the recent change to carray.  The intent is to fix this problem
in a different way so that it works for all table-valued functions.

FossilOrigin-Name: 43e02dbb0dbe7192304125cd3298b3f4bbac02395d4d03f7f8d5f96b465eb43e

5 weeks agoFix an integer overflow that could lead to a buffer overrun in the zipfile extension...
dan [Mon, 1 Jun 2026 11:52:23 +0000 (11:52 +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: a8dac6af353c02aed8eaaba5921e036d3f3a6639367ae70e8c75d759c7b4ab52

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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