drh
3dbab77bf1
Remove dead code created by [20c2f8ce9242c3db].
...
FossilOrigin-Name: 68c5fd5fa0f986b782519472398b068ba7c295c56a0e0199b8e0509d0d1685fb
2026-05-21 14:16:47 +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
37e253208f
Improved entropy collection on Windows.
...
FossilOrigin-Name: b734b76af3f732e0db8a002781bae57aa7a01c4a7f5151605144a6aeef993a21
2026-05-20 20:03:07 +00:00
drh
fdf746967c
Add an sqlite3FaultSim() call to the changes at [6193e4105b6a58ea] to
...
make them testable.
FossilOrigin-Name: 0de3d95500b7ecd41a09d81f176c1510896e811b3e468e1cf50f752305fdb06f
2026-05-19 17:05:28 +00:00
drh
45b4213160
Fix a incorrect assert() from [52dd437d51d3c1af] reported by OSSFuzz.
...
FossilOrigin-Name: 64b49e4d431d35db0920c7fc8a89d38ce2d2d2dbf42a7caf76aaa9685d66601b
2026-05-19 16:07:08 +00:00
drh
db5aebce43
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
2026-05-19 12:40:00 +00:00
drh
62cd986418
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
2026-05-18 19:44:04 +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
b6ea7f0550
Fix a harmless compiler warning caused by [460243ee4c28873d].
...
FossilOrigin-Name: e076ac7b648988b48b546e19b5ef2e50061b44c85bc2645362409e295e3b4b11
2026-05-18 11:44:09 +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
b969f8c2f1
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
2026-05-18 10:19:14 +00:00
drh
fd88eed8fa
Fix the ".prompt" command so that it honors -bail.
...
FossilOrigin-Name: 5b58bdd33f0410624523fc8adc230db4e5f57283d234a5f0d26a2790629bc0f9
2026-05-17 19:21:30 +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
6df919b723
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
2026-05-17 17:18:12 +00:00
drh
cb388ec9a3
In the CLI, make the NO_COLOR prompt the same as the default prompt, only
...
without any color.
FossilOrigin-Name: cc05e9749c14d6ff4e396ad387c42d53b696680ce74ce6a92f6fb71ed9a53ae5
2026-05-17 16:35:36 +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
drh
d3265d1473
Improved comment on sqlite3ExprCanReturnSubtype() as well as one very
...
minor efficiency improvement.
FossilOrigin-Name: b57d6b76b0f9f4f154997af83f14d545bf2b6b8f7194746835e4c34885db227a
2026-05-16 16:02:08 +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
6166c2ee48
Raise an error if an ALTER TABLE ADD COLUMN statement tries to add
...
a CHECK constraint that contains an internal-use-only SQL function.
FossilOrigin-Name: 52dd437d51d3c1af0777350daeebf1159033eede3f58fcc5ebaeaec8869ffaff
2026-05-14 11:35:17 +00:00
drh
a3e7c597b5
Correction to the documentation for sqlite3_uri_int64().
...
FossilOrigin-Name: 58472fdab0691f7f03f15201542f15148ed7734bfeb495370386d666ae4beded
2026-05-14 10:36:50 +00:00
drh
a8fdc0e0c0
Additional changes to the Windows VFS to try to get the system to a point
...
where it will compile for UWP.
FossilOrigin-Name: 3ddc07110dacef98c14b852dcdc4f11d1c0f4061008bf3a61e2df707b0dc6c6b
2026-05-13 20:06:08 +00:00
drh
8b803c716c
Change to compile-time option that omits non-UWP system calls to
...
SQLITE_UWP. Takes steps to eliminate all non-UWP system calls when that
compile-time option is used.
FossilOrigin-Name: b167c4c96e6a753952eb4be95d6283b50a9c59f4ecf59d60cf10d8de9cb115d8
2026-05-13 18:07:01 +00:00
drh
077be44cc2
In the Windows OS interface, use CreateFileMappingFromApp() and
...
MapViewOfFilFromApp() if SQLITE_OS_WINRT is defined.
FossilOrigin-Name: 3c51436b43ab77b88134851a2773147b49a3c4fb5b0416db5e318b6e12d3b708
2026-05-13 15:11:04 +00:00
drh
1f9c2ed674
On Windows, use only GetSystemTimeAsFileTime() and not GetSystemTime().
...
Also add a TCL script that will renumber the systemcall thunk for Windows.
FossilOrigin-Name: 4b7f0130d68c7a0b98e87d09d0a661c85554215cb111478305307960deab3921
2026-05-13 13:55:31 +00:00
stephan
887fa2fe83
Modify [2990dd27dd] to use setlocale(LC_CTYPE) instead of setlocale(LC_ALL). Same effect but hypothetically a smaller scope.
...
FossilOrigin-Name: 8be57f96f6a72753fd983d7b6b9924c3b60f57c5664eeb7dfe7a0799739597c0
2026-05-13 12:12:54 +00:00
stephan
73da727480
Slightly rework the --editline configure flag for purposes of distinguishing between the two conventional libedit headers. When using libedit, invoke setlocale(), which appears to resolve [forum:aad7a634916ff050|forum post aad7a63491]'s report of non-ASCII input failng to work when linking against libedit.
...
FossilOrigin-Name: 2990dd27dda4333e8ccf9225ff5af690d4062276dd2ad60ee7df922aa6be99ee
2026-05-13 12:06:27 +00:00
drh
94f56f5800
Use GetTickCount64() instead of GetTickCount() in Windows, for portability
...
to UWP.
FossilOrigin-Name: ea65ae964e21541d8f7c00ec679a608d34bc94408d9cc479b2d7fb08bf0e3cdf
2026-05-13 10:47:40 +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
431b85963f
Fix a copy/paste error in a comment. No changes to code.
...
FossilOrigin-Name: 2741193e81750512cae8bb14ebc03fa11dde100da144488b4da1c81a351e4ff6
2026-05-12 18:06:44 +00:00
drh
657721fd32
Attempt to disable false-positive GCC compiler warning.
...
FossilOrigin-Name: e377b4d375f2ec64085d953e87739904bbbccf09d82db99fe0579368c985ca84
2026-05-12 11:47:01 +00:00
drh
e14c16189e
Fix the xfer-optimization such that if the destination table has
...
constraints on the hidden rowid, the optimization is not attempted.
[forum:/forumpost/6dcc95e3ca|Forum post 6dcc95e3ca].
FossilOrigin-Name: da9ca357fb24f39a4a3292ca447773c6233a3084721abfbd5665a45ee8a4bed4
2026-05-11 16:58:05 +00:00
drh
cf420c9910
Fix comment typos. Add test cases.
...
FossilOrigin-Name: 7a85921ae585f948f084bd8fccc1cc002539415e629aa0021d58afc17e5471a3
2026-05-11 14:14:25 +00:00
drh
5f6a6fa6f0
An alternative fix to ALTER TABLE ADD CONSTRAINT.
...
FossilOrigin-Name: a231fc6d58abb3b76d0e669babdb377e41b5a348d155ab5f2c1fe49eefbbf3a9
2026-05-11 12:38:18 +00:00
drh
219acc9f4f
Fix harmless bug in testing logic. No changes to deliverables.
...
FossilOrigin-Name: c4a6e62b5f36f9df988d2ec12a92a614e9e813cdcd50198ec2827c33745a362a
2026-05-11 11:05:17 +00:00
drh
8bee9cd3cf
Hush-up a false-positive compiler warning from GCC. See
...
[forum:/forumpost/281ace196961082c|forum thread 281ace196961082c].
FossilOrigin-Name: 45a215290896eee9776c2b1727363f6e1c1aad5b521f4f92b13981a5da5d0f54
2026-05-11 10:25:58 +00:00
drh
f8ca671997
Fix the xfer optimization so that it does not work if the destination is
...
a STRICT table that is incompatible with the source.
[forum:/forumpost/4955d2235c22ef4e|Forum post 4955d2235c22ef4e].
FossilOrigin-Name: 5e916b2a8fd41ffc42c29bfc9b5333b7a579f37fe094bd0b6b00e2f176c4e3fe
2026-05-11 00:53:44 +00:00
drh
2c8f97159c
Fix upward propagation of expression properties into row-value expressions.
...
[forum:/info/8387cc287240643e|Forum post 8387cc287240643e].
FossilOrigin-Name: 0372dd717b852da8dc2c6b0ff2da02a2ac25bc0486a38e4c2a970694d897b6c9
2026-05-09 13:54:40 +00:00
drh
1788b7b719
Remove unnecessary and incorrect assert() statements in the new %J code.
...
FossilOrigin-Name: 5a8497dbec80b55a2dedc8a6f9ee823243e01a08d37ceeed1f87214dfe527d63
2026-05-07 20:45:57 +00:00
drh
4f95a67b0c
Fix harmless UB by declaring a constant 1 to be unsigned.
...
FossilOrigin-Name: c5235734a6787b9c59a356f4e0ccbb3f262b8d9a6407ebd415afc87e859b0498
2026-05-07 14:47:21 +00:00
drh
31c19f587d
Fix another off-by-one error.
...
FossilOrigin-Name: 8ae724a647dfcb986c4037caaab07e5d0188e66b66039a4758937c963f1fcbf7
2026-05-07 14:30:34 +00:00
drh
bfc0414b9a
Bug fixes in the new %J and %j logic.
...
FossilOrigin-Name: d1b55572c76569cb1e999028e79bcf2e76069f8778f0c8e933ace606d7b6a8b2
2026-05-07 14:14:05 +00:00
drh
f9db8b2350
Add support for width to %J and %j.
...
FossilOrigin-Name: 0b102f2076586c08b134c78cc18acdd05555fa2b534c895535e96a0466661910
2026-05-07 10:46:39 +00:00
drh
ad37ec3aa2
Separate conversion letters %J and %j. %J includes surrounding quotes and
...
%j omits them. Some test cases added.
FossilOrigin-Name: ea7c2c1a6bd32695fc3a1f2295b4c4719e3d9dd0a8f6480e7c95e17b564c3391
2026-05-07 08:58:10 +00:00