]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
5 hours agoFix a case where sqlite3expert could be tricked into executing arbitrary SQL by a... master
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2 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

2 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

2 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

2 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

2 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

3 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

3 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

3 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

3 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

4 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

4 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

5 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

5 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

5 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

5 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

8 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

8 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

8 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

8 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

8 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

8 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

10 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

11 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

11 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

11 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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