]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 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

7 weeks agoWhen two tables are joined by USING, the affinity of the join column can
drh [Sat, 16 May 2026 19:40:55 +0000 (19:40 +0000)] 
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

7 weeks agoFix false-negatives in the sqlite3ExprCanReturnSubtype() routine having
drh [Sat, 16 May 2026 17:28:56 +0000 (17:28 +0000)] 
Fix false-negatives in the sqlite3ExprCanReturnSubtype() routine having
to do with CASE, CAST, and COLLATE expressions and the "+" no-op operator.
[forum:/forumpost/1f0168a120:Forum post 1f0168a120].

FossilOrigin-Name: 9be94e961457967408cbd0acf11877fbb323a48eee405fff53755770f1b3261a

7 weeks agoImproved comment on sqlite3ExprCanReturnSubtype() as well as one very index-on-case-expr-subtype
drh [Sat, 16 May 2026 16:02:08 +0000 (16:02 +0000)] 
Improved comment on sqlite3ExprCanReturnSubtype() as well as one very
minor efficiency improvement.

FossilOrigin-Name: b57d6b76b0f9f4f154997af83f14d545bf2b6b8f7194746835e4c34885db227a

8 weeks agoWhen using an index on a CASE expression that may return a value with a subtype,...
dan [Fri, 15 May 2026 19:44:24 +0000 (19:44 +0000)] 
When using an index on a CASE expression that may return a value with a subtype, avoid discarding any subtype.

FossilOrigin-Name: 69c9a82cbaea7b6faa6a357dd884b1e0d2bc684d847efb31a2d64c75fabf5428

8 weeks agoHave window functions sum(), total() and avg() correctly handle the obscure case...
dan [Fri, 15 May 2026 18:36:11 +0000 (18:36 +0000)] 
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

8 weeks agoHave the sqlite_dbpage module correctly handle constraints of the form "WHERE pgno...
dan [Fri, 15 May 2026 17:24:34 +0000 (17:24 +0000)] 
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

8 weeks agoIf there is a WHERE clause constraint of the form "a=$var", then
drh [Thu, 14 May 2026 22:39:41 +0000 (22:39 +0000)] 
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

8 weeks agoHandle constraints like "a=$var" where the value bound to $var is -1, 0 or 1 in the... reprepare-a=var
dan [Thu, 14 May 2026 17:54:23 +0000 (17:54 +0000)] 
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

8 weeks agoHarden the QRF extension against integer overflow problems.
drh [Thu, 14 May 2026 13:29:59 +0000 (13:29 +0000)] 
Harden the QRF extension against integer overflow problems.

FossilOrigin-Name: 83d3a0d39b0b36a47003206d390935d4c94f7a906ada02f69e0ad1eef2f22d59

8 weeks agoIn QRF, relax the constraint on the screen width so that it can be as
drh [Thu, 14 May 2026 12:46:41 +0000 (12:46 +0000)] 
In QRF, relax the constraint on the screen width so that it can be as
wide as a 32-bit signed integer can count.
[forum:/forumpost/2570051b60|Forum post 2570051b60].

FossilOrigin-Name: 91439d95dc81adebf8226f2b7c33ca62a4b7163cfc14e03993524aa17b5767f3

8 weeks agoRaise an error if an ALTER TABLE ADD COLUMN statement tries to add
drh [Thu, 14 May 2026 11:35:17 +0000 (11:35 +0000)] 
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

8 weeks agoCorrection to the documentation for sqlite3_uri_int64().
drh [Thu, 14 May 2026 10:36:50 +0000 (10:36 +0000)] 
Correction to the documentation for sqlite3_uri_int64().

FossilOrigin-Name: 58472fdab0691f7f03f15201542f15148ed7734bfeb495370386d666ae4beded

8 weeks agoFix the sqlite3changegroup_change_finish() API so that it correctly handles NULL...
dan [Wed, 13 May 2026 20:37:30 +0000 (20:37 +0000)] 
Fix the sqlite3changegroup_change_finish() API so that it correctly handles NULL being passed for the pzErr parameter.

FossilOrigin-Name: f81d6d7bc8943729f678a3b62921a96764b15b9cc11d8a5753e48210a1b59617

8 weeks agoAdditional changes to the Windows VFS to try to get the system to a point
drh [Wed, 13 May 2026 20:06:08 +0000 (20:06 +0000)] 
Additional changes to the Windows VFS to try to get the system to a point
where it will compile for UWP.

FossilOrigin-Name: 3ddc07110dacef98c14b852dcdc4f11d1c0f4061008bf3a61e2df707b0dc6c6b

8 weeks agoChange to compile-time option that omits non-UWP system calls to
drh [Wed, 13 May 2026 18:07:01 +0000 (18:07 +0000)] 
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

8 weeks agoIn the Windows OS interface, use CreateFileMappingFromApp() and
drh [Wed, 13 May 2026 15:11:04 +0000 (15:11 +0000)] 
In the Windows OS interface, use CreateFileMappingFromApp() and
MapViewOfFilFromApp() if SQLITE_OS_WINRT is defined.

FossilOrigin-Name: 3c51436b43ab77b88134851a2773147b49a3c4fb5b0416db5e318b6e12d3b708

8 weeks agoOn Windows, use only GetSystemTimeAsFileTime() and not GetSystemTime().
drh [Wed, 13 May 2026 13:55:31 +0000 (13:55 +0000)] 
On Windows, use only GetSystemTimeAsFileTime() and not GetSystemTime().
Also add a TCL script that will renumber the systemcall thunk for Windows.

FossilOrigin-Name: 4b7f0130d68c7a0b98e87d09d0a661c85554215cb111478305307960deab3921

8 weeks agoModify [2990dd27dd] to use setlocale(LC_CTYPE) instead of setlocale(LC_ALL). Same...
stephan [Wed, 13 May 2026 12:12:54 +0000 (12:12 +0000)] 
Modify [2990dd27dd] to use setlocale(LC_CTYPE) instead of setlocale(LC_ALL). Same effect but hypothetically a smaller scope.

FossilOrigin-Name: 8be57f96f6a72753fd983d7b6b9924c3b60f57c5664eeb7dfe7a0799739597c0

8 weeks agoSlightly rework the --editline configure flag for purposes of distinguishing between...
stephan [Wed, 13 May 2026 12:06:27 +0000 (12:06 +0000)] 
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

8 weeks agoUse GetTickCount64() instead of GetTickCount() in Windows, for portability
drh [Wed, 13 May 2026 10:47:40 +0000 (10:47 +0000)] 
Use GetTickCount64() instead of GetTickCount() in Windows, for portability
to UWP.

FossilOrigin-Name: ea65ae964e21541d8f7c00ec679a608d34bc94408d9cc479b2d7fb08bf0e3cdf

8 weeks agoIn Haiku OS builds, fix the --editline configure flag to actually link against libedi...
stephan [Wed, 13 May 2026 07:33:31 +0000 (07:33 +0000)] 
In Haiku OS builds, fix the --editline configure flag to actually link against libedit rather than libreadline.

FossilOrigin-Name: 642168d386074d1398b52c2d952e4cb153617f7bed82fb99d76b6d28dc8242bc

8 weeks agoDo not allow internal-use-only functions to be used in CHECK constraints add-column-safety
drh [Tue, 12 May 2026 19:33:04 +0000 (19:33 +0000)] 
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

8 weeks agoFix a copy/paste error in a comment. No changes to code.
drh [Tue, 12 May 2026 18:06:44 +0000 (18:06 +0000)] 
Fix a copy/paste error in a comment.  No changes to code.

FossilOrigin-Name: 2741193e81750512cae8bb14ebc03fa11dde100da144488b4da1c81a351e4ff6

8 weeks agoFix the insert4.test test module so that it works when SQLite is
drh [Tue, 12 May 2026 12:34:16 +0000 (12:34 +0000)] 
Fix the insert4.test test module so that it works when SQLite is
compiled with SQLITE_OMIT_VIRTUALTABLE.

FossilOrigin-Name: bff9db9b5eb05ec3f99e35cb4c198d24bcb9ee7ceb2401bf55627788ac2b96db

8 weeks agoAttempt to disable false-positive GCC compiler warning.
drh [Tue, 12 May 2026 11:47:01 +0000 (11:47 +0000)] 
Attempt to disable false-positive GCC compiler warning.

FossilOrigin-Name: e377b4d375f2ec64085d953e87739904bbbccf09d82db99fe0579368c985ca84

2 months agoFix the xfer-optimization such that if the destination table has
drh [Mon, 11 May 2026 16:58:05 +0000 (16:58 +0000)] 
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

2 months agoPrevent internal-use-only SQL functions from being used inside of a CHECK
drh [Mon, 11 May 2026 14:22:45 +0000 (14:22 +0000)] 
Prevent internal-use-only SQL functions from being used inside of a CHECK
constraint added using ALTER TABLE ADD CONSTRAINT.
[forum:/forumpost/6256ee34ed|Forum post 6256ee34ed].

FossilOrigin-Name: 07beb966daddd0dfea36265eb38ebfcfbb10b0cbccda458dea501eda330a49f0

2 months agoFix comment typos. Add test cases. add-constraint-safety-v2
drh [Mon, 11 May 2026 14:14:25 +0000 (14:14 +0000)] 
Fix comment typos.  Add test cases.

FossilOrigin-Name: 7a85921ae585f948f084bd8fccc1cc002539415e629aa0021d58afc17e5471a3

2 months agoAn alternative fix to ALTER TABLE ADD CONSTRAINT.
drh [Mon, 11 May 2026 12:38:18 +0000 (12:38 +0000)] 
An alternative fix to ALTER TABLE ADD CONSTRAINT.

FossilOrigin-Name: a231fc6d58abb3b76d0e669babdb377e41b5a348d155ab5f2c1fe49eefbbf3a9

2 months agoImprove detection of corrupt database records in fts5.
dan [Mon, 11 May 2026 11:53:07 +0000 (11:53 +0000)] 
Improve detection of corrupt database records in fts5.

FossilOrigin-Name: 87b653731171a26396f9796b0a5c436593571d39e991d8d040ef4473cf459b67

2 months agoFix potential buffer overwrite that could occur in fts5 when processing corrupt records.
dan [Mon, 11 May 2026 11:12:06 +0000 (11:12 +0000)] 
Fix potential buffer overwrite that could occur in fts5 when processing corrupt records.

FossilOrigin-Name: 4a5ad516ea93926c0d5206b4d72c3675905d2bf666b27a649256b93eb95c671b

2 months agoFix harmless bug in testing logic. No changes to deliverables.
drh [Mon, 11 May 2026 11:05:17 +0000 (11:05 +0000)] 
Fix harmless bug in testing logic.  No changes to deliverables.

FossilOrigin-Name: c4a6e62b5f36f9df988d2ec12a92a614e9e813cdcd50198ec2827c33745a362a

2 months agoHush-up a false-positive compiler warning from GCC. See
drh [Mon, 11 May 2026 10:25:58 +0000 (10:25 +0000)] 
Hush-up a false-positive compiler warning from GCC.  See
[forum:/forumpost/281ace196961082c|forum thread 281ace196961082c].

FossilOrigin-Name: 45a215290896eee9776c2b1727363f6e1c1aad5b521f4f92b13981a5da5d0f54

2 months agoFix the xfer optimization so that it does not work if the destination is
drh [Mon, 11 May 2026 00:53:44 +0000 (00:53 +0000)] 
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

2 months agoMinor config script doc tweaks.
stephan [Sat, 9 May 2026 14:32:16 +0000 (14:32 +0000)] 
Minor config script doc tweaks.

FossilOrigin-Name: 678954553e123de9eb0bbe7c3101039218edd27d282b015f51e69a2eba683feb

2 months agoIn sqlite-config.tcl remove a reference to the platform name apple when checking...
stephan [Sat, 9 May 2026 14:01:57 +0000 (14:01 +0000)] 
In sqlite-config.tcl remove a reference to the platform name apple when checking for Mac platforms, relying on a check for darwin instead, analog to [b5c6cb13cff53f]. Intended to resolve [forum:c26b856db7dd5caf|forum post c26b856db7dd5caf].

FossilOrigin-Name: 7ccffe38b4b99c61e4bfc703dc4b3516d7c2a72d73680b699886ee43eea9bd21

2 months agoFix upward propagation of expression properties into row-value expressions.
drh [Sat, 9 May 2026 13:54:40 +0000 (13:54 +0000)] 
Fix upward propagation of expression properties into row-value expressions.
[forum:/info/8387cc287240643e|Forum post 8387cc287240643e].

FossilOrigin-Name: 0372dd717b852da8dc2c6b0ff2da02a2ac25bc0486a38e4c2a970694d897b6c9

2 months agoImproved detection of OOM in the regexp_bytecode() SQLite function
drh [Sat, 9 May 2026 13:16:18 +0000 (13:16 +0000)] 
Improved detection of OOM in the regexp_bytecode() SQLite function
(available in debug builds only).
[forum:/forumpost/a3a10e1c7b5dd1d2|Forum post a3a10e1c7b5dd1d2].

FossilOrigin-Name: 172e8c35badadc3c5eb5065da8ed2161093a0adff0ecfb5b162f78a9fb55bb34

2 months agoFix an integer truncation problem due to oversized inputs to the
drh [Sat, 9 May 2026 12:41:23 +0000 (12:41 +0000)] 
Fix an integer truncation problem due to oversized inputs to the
approximate_match virtual table extension.
[forum:/info/625f687e4d25c392|Forum post 625f687e4d25c392].

FossilOrigin-Name: 2881e17cc030814b350ca371fd2fd2089d3ff2fcc4ea52654de8bc5c2fc95222

2 months agoFix a corner-case floating-point rounding problem in the generate_series()
drh [Sat, 9 May 2026 12:03:14 +0000 (12:03 +0000)] 
Fix a corner-case floating-point rounding problem in the generate_series()
virtual table, introduced by [c113e31b818d1677] and reported by
[forum:/info/6e6cf9054bea2b1d|forum post 6e6cf9054bea2b1d].

FossilOrigin-Name: ff56785674ebeb1d4bab66ba0827956a2728c8c14419f933d40dc0152efbd4f5

2 months agoRemove unnecessary and incorrect assert() statements in the new %J code.
drh [Thu, 7 May 2026 20:45:57 +0000 (20:45 +0000)] 
Remove unnecessary and incorrect assert() statements in the new %J code.

FossilOrigin-Name: 5a8497dbec80b55a2dedc8a6f9ee823243e01a08d37ceeed1f87214dfe527d63

2 months agoAdd the %J and %j conversions to printf() - rendering JSON string
drh [Thu, 7 May 2026 15:04:30 +0000 (15:04 +0000)] 
Add the %J and %j conversions to printf() - rendering JSON string
literals.

FossilOrigin-Name: 7e6fd838a15f08bf15d57f1887ed1019b58aa6be9eb7b162e67e0d9412082c6d

2 months agoFix harmless UB by declaring a constant 1 to be unsigned. format-json
drh [Thu, 7 May 2026 14:47:21 +0000 (14:47 +0000)] 
Fix harmless UB by declaring a constant 1 to be unsigned.

FossilOrigin-Name: c5235734a6787b9c59a356f4e0ccbb3f262b8d9a6407ebd415afc87e859b0498

2 months agoFix another off-by-one error.
drh [Thu, 7 May 2026 14:30:34 +0000 (14:30 +0000)] 
Fix another off-by-one error.

FossilOrigin-Name: 8ae724a647dfcb986c4037caaab07e5d0188e66b66039a4758937c963f1fcbf7

2 months agoBug fixes in the new %J and %j logic.
drh [Thu, 7 May 2026 14:14:05 +0000 (14:14 +0000)] 
Bug fixes in the new %J and %j logic.

FossilOrigin-Name: d1b55572c76569cb1e999028e79bcf2e76069f8778f0c8e933ace606d7b6a8b2

2 months agoAdd support for width to %J and %j.
drh [Thu, 7 May 2026 10:46:39 +0000 (10:46 +0000)] 
Add support for width to %J and %j.

FossilOrigin-Name: 0b102f2076586c08b134c78cc18acdd05555fa2b534c895535e96a0466661910

2 months agoSeparate conversion letters %J and %j. %J includes surrounding quotes and
drh [Thu, 7 May 2026 08:58:10 +0000 (08:58 +0000)] 
Separate conversion letters %J and %j.  %J includes surrounding quotes and
%j omits them.  Some test cases added.

FossilOrigin-Name: ea7c2c1a6bd32695fc3a1f2295b4c4719e3d9dd0a8f6480e7c95e17b564c3391

2 months agoGet precision working on %J, both with and with the ! flag. Width is
drh [Thu, 7 May 2026 00:02:55 +0000 (00:02 +0000)] 
Get precision working on %J, both with and with the ! flag.  Width is
still a no-op, and there are no test cases.  Incremental check-in.

FossilOrigin-Name: 18166bce208c64b7f3afaa88c27a10e0295a89f9c72942dcaa949cf7efb479e6

2 months agoExperimental prototype of the %J conversion in printf().
drh [Wed, 6 May 2026 20:48:34 +0000 (20:48 +0000)] 
Experimental prototype of the %J conversion in printf().

FossilOrigin-Name: 7f6b1bae0849f0a840b95ae95aa6fdc6d51b72fdd50493649f584ad7829a3060

2 months agoFix a minor typo in a comment in the json module.
drh [Wed, 6 May 2026 19:13:21 +0000 (19:13 +0000)] 
Fix a minor typo in a comment in the json module.

FossilOrigin-Name: 5c6d3e9d83af94234f67b06bd23c4eb0178a80c74c39be4945b3282244630020

2 months agoMinor internal doc typo fixes.
stephan [Wed, 6 May 2026 06:57:42 +0000 (06:57 +0000)] 
Minor internal doc typo fixes.

FossilOrigin-Name: d588680240a7f4395f2ef52dd78635de66120a677a41a28ceb96921b3333973d

2 months agoDelete the OPFS SEE test dbs when done with them.
stephan [Tue, 5 May 2026 15:31:41 +0000 (15:31 +0000)] 
Delete the OPFS SEE test dbs when done with them.

FossilOrigin-Name: cbb9f7bcd04c586d523192f32c0ce7dcec72a76bb9a9c3b67fcde1f9e79f7218

2 months agoAdd importDb() tests of SEE databases for the opfs/opfs-wl VFSes, analog to the opfs...
stephan [Tue, 5 May 2026 15:26:24 +0000 (15:26 +0000)] 
Add importDb() tests of SEE databases for the opfs/opfs-wl VFSes, analog to the opfs-sahpool test in [a5a9ac7ad6622b].

FossilOrigin-Name: 534d388031dfacf83cb40c712150a376db10393c98936a33ea80da0166b3dbeb

2 months agoFor the various OPFS VFS db-import routines, in SEE builds (only) relax the is-this...
stephan [Tue, 5 May 2026 08:51:10 +0000 (08:51 +0000)] 
For the various OPFS VFS db-import routines, in SEE builds (only) relax the is-this-a-db check to allow for SEE dbs not having the usual header string in cleartext. Addresses [https://sqlite.org/see/forumpost/f84bef3552|SEE forum post f84bef3552].

FossilOrigin-Name: a5a9ac7ad6622b5b07193aa279deefde7d59ca17f81aba9dd78ee90718446993

2 months agoFix a predicate which causes a false error in the OPFS SAHPool tests when building...
stephan [Tue, 5 May 2026 08:11:55 +0000 (08:11 +0000)] 
Fix a predicate which causes a false error in the OPFS SAHPool tests when building with SEE.

FossilOrigin-Name: 97ab0a2fd56501d08bc2ab2adbe70a4130f6c5b5db343941fa16c7b34c550bd3

2 months agoAdd #include time.h to shell.c.in to get fiddle building with emcc 5.x.
stephan [Tue, 5 May 2026 07:57:54 +0000 (07:57 +0000)] 
Add #include time.h to shell.c.in to get fiddle building with emcc 5.x.

FossilOrigin-Name: ae675dfe7946d37f224f22ad34b6ebe049fb1426cb3d49d88ebc10d0b7634e40

2 months agoFix a test case on CLI ".help" output due to the output changing because
drh [Mon, 4 May 2026 18:36:04 +0000 (18:36 +0000)] 
Fix a test case on CLI ".help" output due to the output changing because
of check-in [1590b401ff0670b6].

FossilOrigin-Name: b6ad35096d48de29fd8da498ac23cd7eba9194a70cad05ec49c318f11fe77199

2 months agoWhen using the OR-optimization on a loop created by exists-to-join, do the early...
dan [Mon, 4 May 2026 18:16:09 +0000 (18:16 +0000)] 
When using the OR-optimization on a loop created by exists-to-join, do the early-exit logic for the whole loop, not for each individual OR branch. Possible fix for forum post [forum:c8b205720c | c8b205720c].

FossilOrigin-Name: 70a5d091241748aea63aa13bb218b573d0b84615a0682c2ec693addbfe9bc2f4

2 months agoWhen using the OR-optimization on a loop created by exists-to-join, do the early... exists-or-expr-fix
dan [Mon, 4 May 2026 17:16:43 +0000 (17:16 +0000)] 
When using the OR-optimization on a loop created by exists-to-join, do the early-exit logic for the whole loop, not for each individual OR branch. Possible fix for forum post [forum:c8b205720c | c8b205720c].

FossilOrigin-Name: 3d197dd03c47a0fb687064131dbf519b8c587a47f9c2bccfdb83d7eae8418336

2 months agoAdd a missing tcl quote which breaks the build on msys2.
stephan [Mon, 4 May 2026 16:18:25 +0000 (16:18 +0000)] 
Add a missing tcl quote which breaks the build on msys2.

FossilOrigin-Name: 9380be51c76392eca9544f1fd56373406d2ce001e77a8d476deb772968f2aacc

2 months agoAdd the --color and --no-color options to the ".prompt" command of the CLI.
drh [Mon, 4 May 2026 12:58:05 +0000 (12:58 +0000)] 
Add the --color and --no-color options to the ".prompt" command of the CLI.

FossilOrigin-Name: 1590b401ff0670b68910504c281e67ecae7ae357ba3ed65f96dabaabd7aaeb7f

2 months agoHonor the NO_COLOR environment variable. If NO_COLOR is set and
drh [Mon, 4 May 2026 10:14:13 +0000 (10:14 +0000)] 
Honor the NO_COLOR environment variable.  If NO_COLOR is set and
SQLITE_PS1 and SQLITE_PS2 are not set, then the default prompt is
monochrome and ANSI escapes are omitted.  Also change the name of
the SQLITE_PS_NOANSI compile-time option to SQLITE_NO_COLOR.

FossilOrigin-Name: 7e4134e3ff1ca8712f5fc78fadae665549450988dc43af27c7fe0c77f10ce3fb

2 months agoNew test cases for the shell prompt
drh [Sun, 3 May 2026 18:31:49 +0000 (18:31 +0000)] 
New test cases for the shell prompt

FossilOrigin-Name: 2340cbbd230bdadedbb5d3eb9cfd287fd934e69ce5a2c989e141b0fc87b947aa

2 months agoImprovements to the non-printing character delimiter logic in the CLI
drh [Sun, 3 May 2026 15:53:52 +0000 (15:53 +0000)] 
Improvements to the non-printing character delimiter logic in the CLI
prompt, for improved accuracy and for improved testability.

FossilOrigin-Name: f5649795cd8d7a1f270037ef0b212ea605c1665ec05a75a6da0b250f2aeab070

2 months agoChange the non-printing character escapes for editline to U+0001 and
drh [Sat, 2 May 2026 23:40:40 +0000 (23:40 +0000)] 
Change the non-printing character escapes for editline to U+0001 and
U+0002.  Also insert those escapes for readline.  Readline does not
need it (because it can figure them out on its own) but they are needed
when editline is being used in readline-compatibility mode, and we have
no way of distinguishing between editline and readline in that case, so
we might as well include them.

FossilOrigin-Name: b9545b0f0b6fa0a777a064e1410b17f52cb49d853c188f9b8b3a772bd810ece3

2 months agoAttempt to automatically insert U+0001 escape bytes before and after
drh [Sat, 2 May 2026 23:03:42 +0000 (23:03 +0000)] 
Attempt to automatically insert U+0001 escape bytes before and after
ANSI X3.64 escape sequences when using editline, to work around the
limitations of editline.

FossilOrigin-Name: 63050bee6e5ed46cead14bd5a02b0cb6a7dbcdcb6a56601b90c10cf1c8d84efc

2 months agoFix a harmless compiler warning on some MSVC versions.
drh [Sat, 2 May 2026 20:19:31 +0000 (20:19 +0000)] 
Fix a harmless compiler warning on some MSVC versions.

FossilOrigin-Name: bb8f6deeff31e9cc9b5a88b17b29dc6cd4fb4515134fa8e9758e33e42bbe89b0

2 months agoMinor optimization to the authorizer.
drh [Sat, 2 May 2026 17:30:33 +0000 (17:30 +0000)] 
Minor optimization to the authorizer.

FossilOrigin-Name: 625f78a630bbf897f945065f1b85a92fe26e426302c8f6edc4d26a817ff62358

2 months agoFix harmless compiler warnings.
drh [Sat, 2 May 2026 15:58:28 +0000 (15:58 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: a0d0b5aff51088699e5ad0a726c350d10744b1779acd9ee54232659fb4c352a4

2 months agoClose database connections in a timely manner to fix test script problems
drh [Sat, 2 May 2026 11:47:22 +0000 (11:47 +0000)] 
Close database connections in a timely manner to fix test script problems
on Windows.

FossilOrigin-Name: 068a53865a17d4c2b4ce227fc08a2c019d1dbf31d833842ec08ab5665a3565a3

2 months agoFix an SQLITE_MISUSE memory error in check-ini [1f940357f7bb160b].
drh [Fri, 1 May 2026 17:42:15 +0000 (17:42 +0000)] 
Fix an SQLITE_MISUSE memory error in check-ini [1f940357f7bb160b].

FossilOrigin-Name: fc64113e8f9aee0161e682db7c244a7849f2db86551a557b276deb1785941476

2 months agoHarden the recovery extension against SQL injections coming from the
drh [Fri, 1 May 2026 16:06:21 +0000 (16:06 +0000)] 
Harden the recovery extension against SQL injections coming from the
sqlite_schema table of the database being recovered.

FossilOrigin-Name: 9190f1b9b8889e4d80c370db36b916744d5779de0ec51da0369bbe74adb7b931

2 months agoCheck-in [1786fcd5b4ee6cd9] works great and generates correct code, but it
drh [Fri, 1 May 2026 16:03:51 +0000 (16:03 +0000)] 
Check-in [1786fcd5b4ee6cd9] works great and generates correct code, but it
upset UBSAN.  This check-in fixes the UBSAN complaint.

FossilOrigin-Name: 7cd76847e8c9b683e39c1063a343288f11b4aa5e9302394fe0c4244d361ee4f1

2 months agoThe value for /f and other filename substitutions in SQLITE_PS1 is now
drh [Thu, 30 Apr 2026 18:23:58 +0000 (18:23 +0000)] 
The value for /f and other filename substitutions in SQLITE_PS1 is now
"memory" if open on an in-memory database.

FossilOrigin-Name: 4aac1057eeaf6c29a4893e9c080497c780b0963e810c501532d79eba1b457f27

2 months agoRemove lots of code used to support legacy Windows version (WindowsXP and
drh [Thu, 30 Apr 2026 16:52:56 +0000 (16:52 +0000)] 
Remove lots of code used to support legacy Windows version (WindowsXP and
before).  Use Slim Reader/Writer Locks on Windows for non-recursive mutexes,
since SRWLs are now available on all supported Windows platforms.

FossilOrigin-Name: 6f7a5ff22db10f889596239aae5f6a1130cbdfe72612ceee68cbeb3b86e40227

2 months agoFix a harmless compiler warning in src/mutex_w32.c.
drh [Thu, 30 Apr 2026 15:41:01 +0000 (15:41 +0000)] 
Fix a harmless compiler warning in src/mutex_w32.c.

FossilOrigin-Name: 8de796ca459f2c996937fe1107838b217572636110c8c09e358343385bf17a1b

2 months agoFix the memdb1.test test module so that it runs correctly on Windows.
drh [Thu, 30 Apr 2026 15:33:44 +0000 (15:33 +0000)] 
Fix the memdb1.test test module so that it runs correctly on Windows.

FossilOrigin-Name: 9012f8ea7454bbb792b4361ed74d778e02b98ef44a443f9a23a27a4222fda747

2 months agoChange the CLI warning that appears in the header about opening a
drh [Thu, 30 Apr 2026 15:19:09 +0000 (15:19 +0000)] 
Change the CLI warning that appears in the header about opening a
in-memory database, to be more readable.

FossilOrigin-Name: cc64cafdfe0b0965fabaf9d561d9a108c20a3643f71b36e6a6c51fc8f30b82cb

2 months agoAdd the /m escape to the CLI prompt string. Use it to show "memory"
drh [Thu, 30 Apr 2026 15:07:25 +0000 (15:07 +0000)] 
Add the /m escape to the CLI prompt string.  Use it to show "memory"
in italic for the default prompt for in-memory databases.

FossilOrigin-Name: 1e3c95393044279997833145cb610b98926fb0c8f53ae4fb35e9fcc6c1ded1a2

2 months agoFix a crash that could occur if the destination database of a backup is
dan [Wed, 29 Apr 2026 19:14:54 +0000 (19:14 +0000)] 
Fix a crash that could occur if the destination database of a backup is
replaced using sqlite3_deserialize() between the call to sqlite3_backup_init()
and the first call to sqlite3_backup_step(). Forum post [forum:15d82885e2 | 15d82885e2].

FossilOrigin-Name: 1f940357f7bb160b583ac5b08ff4e32a9fef353255d032c5a18bcb04416c0f0b

2 months agoReduce the number of system calls in the os_win.c thunk from 81 down omit-legacy-windows
drh [Wed, 29 Apr 2026 16:09:47 +0000 (16:09 +0000)] 
Reduce the number of system calls in the os_win.c thunk from 81 down
to 58, as well as other simplifications.

FossilOrigin-Name: c49521739c961ed5e38424bf26b2e34d8017a85122622ceac5af7398233fe343

2 months agoFurther simplifications to the interface to the Windows family of OSes.
drh [Wed, 29 Apr 2026 15:03:01 +0000 (15:03 +0000)] 
Further simplifications to the interface to the Windows family of OSes.
An incremental check-in.

FossilOrigin-Name: f2aa6b66d2a1b5bb2dc8a44788a061a549a846244354df19b44398839578461e

2 months agoSimplify the Windows interface by removing support for various WindowsXP
drh [Wed, 29 Apr 2026 14:02:23 +0000 (14:02 +0000)] 
Simplify the Windows interface by removing support for various WindowsXP
and WindowsCE.  This is a work-in-progress.  More to follow.

FossilOrigin-Name: 4dbc4d19c4f3b58d0bedd766cfba65d9624903a5ab0a340eb83ddeec058607ea

2 months agoUpdates and simplifications to the mutex implementation on Windows. Uses win-mutex-revamp
drh [Tue, 28 Apr 2026 20:01:03 +0000 (20:01 +0000)] 
Updates and simplifications to the mutex implementation on Windows.  Uses
Slim Reader/Writer Locks for performance, for non-reentrant mutexes.
Requires WindowsVista or later.

FossilOrigin-Name: a75aa5400f94531b8ffd00be4580b0578d8d81ba9681fd06b1d9d96a6180994c

2 months agoAttempt to align instances of the sqlite3_mutex object at 128-byte boundaries
drh [Tue, 28 Apr 2026 15:12:40 +0000 (15:12 +0000)] 
Attempt to align instances of the sqlite3_mutex object at 128-byte boundaries
to prevent false-sharing in multi-core machines. See the discussion at and
around [forum:/forumpost/2026-03-25T23:15:03Z|forum post 2026-03-25T23:15:03Z].

FossilOrigin-Name: 1786fcd5b4ee6cd9b4780f3687dfaec5b90ef0476e0da266a94e069b98e70514

2 months agoFix comment typo
drh [Tue, 28 Apr 2026 12:49:10 +0000 (12:49 +0000)] 
Fix comment typo

FossilOrigin-Name: d64a1dbe0fb2d9286806d833a3146b21d5bf1636a650d5a64cf163c7f2356e98

2 months agoImproved detection of when the alternative windows-compatible main() is
drh [Mon, 27 Apr 2026 14:01:23 +0000 (14:01 +0000)] 
Improved detection of when the alternative windows-compatible main() is
needed in the sqldiff.exe utility.

FossilOrigin-Name: e25b849a603cb08ab888641ff324e9aa129391c4792de86a62c55e9caf84c16e

2 months agoRelax arbitrary length restrictions on some error messages in the CLI.
drh [Mon, 27 Apr 2026 12:43:09 +0000 (12:43 +0000)] 
Relax arbitrary length restrictions on some error messages in the CLI.

FossilOrigin-Name: 52f5531ded8e0d3da3dc4d5c9b3d14573041b9446e2c45b5093c958b6c74e0de

2 months agoIncrease a stack-local buffer size to resolve a test regression introduced in [ff084a...
stephan [Mon, 27 Apr 2026 12:05:56 +0000 (12:05 +0000)] 
Increase a stack-local buffer size to resolve a test regression introduced in [ff084ae341eab5c], in which some tests fail a pattern match check if their absolute file names are too long. Resolves [forum:205f73db1b2806f5|forum post 205f73db1b2806f5].

FossilOrigin-Name: 286fc22c7ca882b0b09de2f1b2a7e0b382af6c498f2f8ad237fe064feaa70d7f

2 months agoFix a crash that could occur if sqlite3_deserialize() was used to overwrite a databas...
dan [Mon, 27 Apr 2026 11:32:43 +0000 (11:32 +0000)] 
Fix a crash that could occur if sqlite3_deserialize() was used to overwrite a database with an open transaction on it. Bug introduced by [fc42d31d6fca21ab] on 2018-03-07 and first released in version 3.23.0. This is not a vulnerability as an attacker that can exploit this already has the ability to execute arbitrary code. Forum post [forum:39134ba029 | 39134ba029].

FossilOrigin-Name: 77662cce9aa452ba5820e5f1a864a802763bd83b937cdb16e7025219eff7bd08

2 months agoRefactor the uint128 type check to consolidate duplicated rules.
stephan [Mon, 27 Apr 2026 06:48:07 +0000 (06:48 +0000)] 
Refactor the uint128 type check to consolidate duplicated rules.

FossilOrigin-Name: 362ef7bc00eea180fb3458bd8887021aed54e321901483edc00ad6b23a33d8e5

2 months agoFeature detection fix for uint128 on RISCV 32-bit, reported in [forum:f8d1417ce8eb2f2...
stephan [Mon, 27 Apr 2026 05:55:38 +0000 (05:55 +0000)] 
Feature detection fix for uint128 on RISCV 32-bit, reported in [forum:f8d1417ce8eb2f22|forum post 2026-04-26T11:41:01Z] and validated by the OP.

FossilOrigin-Name: c4a2c20839ef75534d71d928a03ad276bdc488b0baa76c1505f48dc1ff0bcdd1