]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
19 hours agoDisable the vector-IN-SELECT optimization if the number of columns is so master
drh [Thu, 4 Jun 2026 16:56:11 +0000 (16:56 +0000)] 
Disable the vector-IN-SELECT optimization if the number of columns is so
large that it would cause the WhereTerm.nChild column to wrap.
[bugs:/info/2026-06-04T10:00:49Z|Bug 2026-06-04T10:00:49Z].

FossilOrigin-Name: bb49dfc948048779a30deff9a3d1bb39846f6f72c26a2bdcdd0e386251720fe6

24 hours agoFix a crash that could be caused by configuring the pager-cache with a bulk allocatio...
dan [Thu, 4 Jun 2026 11:48:18 +0000 (11:48 +0000)] 
Fix a crash that could be caused by configuring the pager-cache with a bulk allocation too small to fit even one page. Bug [bugs:/info/2026-06-04T07:03:12Z | 2026-06-04T07:03:12Z].

FossilOrigin-Name: b4b9dc632b06f932759bc2fceeb6fa1dd6e0de329106ae1d34be874ea1695859

24 hours agoFix a possible NULL pointer derefence in the (experimental and untested)
drh [Thu, 4 Jun 2026 11:42:23 +0000 (11:42 +0000)] 
Fix a possible NULL pointer derefence in the (experimental and untested)
uuid.c extension.
[bugs:/info/2026-06-04T09:50:59Z|Bug 2026-06-04T09:50:59Z].

FossilOrigin-Name: fa6374fe3ae1530f0b5ba10b7e6fb703ffe5dd592c532a965e7d50b7d2d70a5f

24 hours agoExtra testcase() macros to ensure adequate testing of the previous
drh [Thu, 4 Jun 2026 11:39:13 +0000 (11:39 +0000)] 
Extra testcase() macros to ensure adequate testing of the previous
check-in.

FossilOrigin-Name: 003013ccabaaa7aea1e78844474ed5032ee9c9824f98c5d36687ac5256a5e128

25 hours agoFix problems with expressions like "(?,?,?) IN (SELECT c,b,a FROM ...)" when there...
dan [Thu, 4 Jun 2026 11:19:43 +0000 (11:19 +0000)] 
Fix problems with expressions like "(?,?,?) IN (SELECT c,b,a FROM ...)" when there is an index on columns "c", "b" and "a", but not in that order. Bug [bugs:/info/2026-06-04T07:02:53Z | 2026-06-04T07:02:53Z].

FossilOrigin-Name: 07667afd0f17b73b58df8ace6a2a5c3a593276f9b7804cb14d4705051258dd75

25 hours agoClearly mark the ext/misc/wholenumber.c extension as "testing and
drh [Thu, 4 Jun 2026 11:18:11 +0000 (11:18 +0000)] 
Clearly mark the ext/misc/wholenumber.c extension as "testing and
debugging use only".  Fix a potential integer overflow that can occur
if the above warning is ignored.
[bugs:/info/2026-06-04T09:40:28Z|Bug 2026-06-04T09:40:28Z].

FossilOrigin-Name: 44154ea9ae99d532d5c7268d70bd8b32751f7a82c367c7bd1ec0e6948d71d1b8

43 hours agoUpdate the utf-8 decoder in the ICU extension to treat invalid sequences as codepoint...
dan [Wed, 3 Jun 2026 17:21:12 +0000 (17:21 +0000)] 
Update the utf-8 decoder in the ICU extension to treat invalid sequences as codepoint 0xFFFD, matching the core. Report [bugs:/info/2026-06-03T04:04:46Z | 2026-06-03T04:04:46Z].

FossilOrigin-Name: 840be0ee62c0ba34f4916c382e2d07071bebd8ce7bca31deb1616869722bfa4d

43 hours agoFix a faulty assert() in rtree that could fire when processing an unusually large...
dan [Wed, 3 Jun 2026 16:46:15 +0000 (16:46 +0000)] 
Fix a faulty assert() in rtree that could fire when processing an unusually large record. Bug [bugs:/info/2026-06-03T14:44:46Z | 2026-06-03T14:44:46Z].

FossilOrigin-Name: e7335dd377a73fc2b913076ee659ed2b0c4a131b16e04b1b55fae677d6b56e8a

44 hours agoUse tail recursion on the larger of the two partitions when doing a
drh [Wed, 3 Jun 2026 16:21:17 +0000 (16:21 +0000)] 
Use tail recursion on the larger of the two partitions when doing a
quicksort as part of the implementation of the median() function,
to avoid excess stack usage on pathological inputs.
[bugs:/info/2026-06-03T07:26:42Z|Bug 2026-06-03T07:26:42Z].

FossilOrigin-Name: 7dc987165c030c260ba90a8878291b5ceb037c48c2f437a8fb3f05b6c4f84fde

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

5 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

6 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

9 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

9 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

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

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