dan
2bc3763ec5
Add extra tests to check that non-deterministic functions may not be used in indexes.
...
FossilOrigin-Name: beeef9dc2b1d778ca628c5e3adc097778646933233ea5ea4f03d2cace0199c17
2026-06-08 10:47:55 +00:00
dan
ee181f479a
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
2026-06-04 11:48:18 +00:00
dan
62a3734e78
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
2026-06-04 11:19:43 +00:00
dan
0120735de1
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
2026-06-03 17:21:12 +00:00
drh
c2d29194a8
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
2026-06-03 16:21:17 +00:00
dan
61523e22f9
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
2026-06-03 15:29:59 +00:00
drh
a735462db6
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
2026-06-03 13:12:20 +00:00
dan
942b7c555a
Avoid excessive recursion and stack overflow in fts3 when processing a corrupt
...
database.
FossilOrigin-Name: 21369378769195f20f839231f625582552eaa3f79044ca3e3efb7f9476b515a8
2026-06-03 11:37:45 +00:00
drh
069e5acd63
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
2026-06-03 11:07:47 +00:00
dan
2a28b15748
Add extra test case to zipfile.test. No code changes.
...
FossilOrigin-Name: 83fe72bcdf866bdaf3043ae5b0c1eb45a9d50a01b24b7a531858271dd746baab
2026-06-02 11:11:02 +00:00
dan
2c351bbf82
Fix minor problems surrounding transitive WHERE constraints and explicit COLLATE terms.
...
FossilOrigin-Name: 9500238a1d603a3f08a8fc0954725d5d217aab339720146ea0bc700e47b81c3c
2026-06-01 17:40:23 +00:00
dan
03aa9a7b50
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
2026-06-01 16:20:40 +00:00
stephan
f55434ab30
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
2026-06-01 13:14:48 +00:00
drh
c079bd08a2
Test case to show that the change fixes the original carray problem.
...
FossilOrigin-Name: 8df6671ae8211b706b7d4f073c5166f0f41f3c11339bc4d28997e8a205a39545
2026-06-01 12:30:13 +00:00
drh
f3eea1efa4
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
2026-06-01 12:07:21 +00:00
dan
1a760748a6
Update new test in zipfile.test so that it does not run if SQLITE_MAX_LENGTH is too small.
...
FossilOrigin-Name: cc86820e198db6ee4e62f455d3dd9877d73873aaccad6ceffd0b34452d35c89c
2026-06-01 11:50:55 +00:00
dan
5481274912
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
2026-06-01 10:56:11 +00:00
drh
ca8593ce68
Fix the carray virtual table so that it gives no solution if it cannot
...
find a usable first parameter. dbsqlfuzz find.
FossilOrigin-Name: 3c0a277e6741c72281e12c44d85902aa6780890a7f59bacc3ac2b35ba27f7211
2026-05-31 19:41:16 +00:00
drh
af6fdd2673
Test case to cover the bug fix in the previous check-in.
...
FossilOrigin-Name: 5b28d49b61d5edc9fef896e685bf227b7e1716c0cc666fd2ebe0d5ea0d11af06
2026-05-31 17:01:44 +00:00
drh
5b98467d28
Be sure to do floating-point to text conversions in JSON to the full
...
17-digits.
FossilOrigin-Name: 61a776650cdc3fe632bdb1dc39f50f542b00a9e5b468180eb54b69750d0cd70c
2026-05-29 23:14:22 +00:00
drh
3d006d0d00
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
2026-05-29 14:57:38 +00:00
dan
9b7ea5700b
Fix a problem with shell tool function analyze() and schema objects with name containing "%" characters.
...
FossilOrigin-Name: c6d5793d5d2212c979e2fe5eb12c3844bfc1f2029bd8d076fec030a04f6d4bb5
2026-05-28 11:12:29 +00:00
stephan
4cc2dbd54d
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
2026-05-26 19:25:36 +00:00
dan
18bee1617f
Fix a 32-bit integer overflow in sqlite3changegroup_change_blob() that could lead to a buffer overwrite.
...
FossilOrigin-Name: 8a289158e2baeee8aa5e601bde46b0482361064ede09e4108f519270efdd5f69
2026-05-26 14:18:50 +00:00
drh
2315f282be
Fix QRF so that it works sensibly with "--wrap 1"
...
FossilOrigin-Name: 48f950b2a1ef841d915ca733baf324a1af98e644b660f238dd5018015340a6c6
2026-05-26 13:54:57 +00:00
drh
5554aa27e6
Fix HTML ">" quoting in QRF.
...
[bugs:/forumpost/f72dfbdeff|Bug f72dfbdeff].
FossilOrigin-Name: 5cee1097b47d850989ebecdb9d2c814e6968240fe3bacb5598ca85067cb95692
2026-05-25 23:44:37 +00:00
drh
5cfa63e6c8
Fix a minor problem with test case mjournal-3.3.
...
FossilOrigin-Name: 80093dc0610438cd506d230eca12e699e05395aecb8048c5bc066379b927e8bb
2026-05-25 20:45:43 +00:00
drh
7e20b624db
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
2026-05-25 19:32:52 +00:00
dan
8c9071ae4e
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
2026-05-25 18:14:58 +00:00
dan
e1233bb609
Fix a potential 1 byte overwrite that could occur when processing a carefully crafted super-journal file.
...
FossilOrigin-Name: b3766c3afd0ac4d31f158ee5938f19d72a047872e422b5f19b1567c60640f54d
2026-05-25 17:58:07 +00:00
drh
ecd9748590
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
2026-05-21 13:03:18 +00:00
drh
6ae9949399
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
2026-05-21 12:04:20 +00:00
drh
badc42fd74
Fix a test case added by [1249eeb1b9759038] that does not work for
...
the config=prepare permutation.
FossilOrigin-Name: 6aaeeffc2c7abbe32050da40bcbffc5f8d596e6df4603b8f8f23294f2465f25e
2026-05-20 01:32:30 +00:00
drh
fd9eba554a
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
2026-05-20 00:16:20 +00:00
drh
cbbeddbd67
Add the "make" subcommand to testrunner.tcl
...
FossilOrigin-Name: 00d546812810252a4d51ff796931dc2ff5bdd5173ddb8f95fb5efccd897087ff
2026-05-19 15:13:03 +00:00
drh
bc94e5dbb6
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
2026-05-19 10:30:13 +00:00
drh
d0fd0cc2fa
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
2026-05-18 23:58:14 +00:00
drh
de94ec87fc
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
2026-05-18 17:55:40 +00:00
drh
e087d0f266
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
2026-05-18 14:28:53 +00:00
drh
e4ba14bc40
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
2026-05-18 11:35:44 +00:00
drh
f77a5af2b3
Fix the new %J and %j formats so they work correctly with a zero precision.
...
FossilOrigin-Name: 428b924dd6e228c879338c5c5edbe68bdc4d8d8e80c37e3d070a8a34b57300c1
2026-05-17 17:50:32 +00:00
drh
0e30396fe2
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
2026-05-16 20:21:55 +00:00
drh
fc12461f5c
When two tables are joined by USING, the affinity of the join column can
...
be the affinity of the corresponding column in either table. But it must
be one or the other.
FossilOrigin-Name: 8cc0b52cca2d6b155b4b169e6f9de9e7d2dc61c40f89920c2b6bf86e549ab6f7
2026-05-16 19:40:55 +00:00
dan
61d9f8f881
When using an index on a CASE expression that may return a value with a subtype, avoid discarding any subtype.
...
FossilOrigin-Name: 69c9a82cbaea7b6faa6a357dd884b1e0d2bc684d847efb31a2d64c75fabf5428
2026-05-15 19:44:24 +00:00
dan
397a3c4a04
Have window functions sum(), total() and avg() correctly handle the obscure case where integer overflow occurs as part of the same step that adds the first real value to the running total.
...
FossilOrigin-Name: 614f8cbc374c7a2d39826706f16ab1c17e75abb420a70be356c7eefa95b271a5
2026-05-15 18:36:11 +00:00
dan
0c3b3f93d1
Have the sqlite_dbpage module correctly handle constraints of the form "WHERE pgno=$pgno" when $pgno is an integer that cannot be represented as a signed, 32-bit value.
...
FossilOrigin-Name: 350152d5124b71b3dd640c109dbac5f05a3a9583a335fbe25f707e1b754c1c74
2026-05-15 17:24:34 +00:00
drh
9f3208e1f8
If there is a WHERE clause constraint of the form "a=$var", then
...
automatically reprepare the query if the binding of $var changes, as
that could affect the query plan.
FossilOrigin-Name: 1249eeb1b9759038b6d10dcd8d65f64f81e8529b28e5e24f9fc5759e9a1c88a5
2026-05-14 22:39:41 +00:00
dan
672b87d0d5
Handle constraints like "a=$var" where the value bound to $var is -1, 0 or 1 in the same way as a literal -1, 0, 1. This might cause excessive reprepares.
...
FossilOrigin-Name: 224e827e87ac8aa4b18ff9b2193decbdcd832579bf6b6e0883c03db90ebd5319
2026-05-14 17:54:23 +00:00
drh
1d2f71ce4a
Do not allow internal-use-only functions to be used in CHECK constraints
...
that are added as part of ALTER TABLE ADD COLUMN.
FossilOrigin-Name: 28272746fb13dcdbe2a4f21ef30446c316dfc843aa3d48f135f490abaee34198
2026-05-12 19:33:04 +00:00
drh
054aff6272
Fix the insert4.test test module so that it works when SQLite is
...
compiled with SQLITE_OMIT_VIRTUALTABLE.
FossilOrigin-Name: bff9db9b5eb05ec3f99e35cb4c198d24bcb9ee7ceb2401bf55627788ac2b96db
2026-05-12 12:34:16 +00:00