]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
12 days agoImproved comments on this enhancement. No code changes. prune-by-like-glob
drh [Tue, 3 Feb 2026 16:29:14 +0000 (16:29 +0000)] 
Improved comments on this enhancement.  No code changes.

FossilOrigin-Name: 510a6738e5d186a74a45fa7385f4722f4e090d85562f259b02c49393ca56860b

12 days agoRefactor the implementation of this enhancement to keep all the code inside
drh [Tue, 3 Feb 2026 14:00:28 +0000 (14:00 +0000)] 
Refactor the implementation of this enhancement to keep all the code inside
the query planner, not leaking out into SQL function implementations.
Expand the enhancement to cover MATCH and REGEXP operators and overloads
of LIKE and GLOB.

FossilOrigin-Name: 96f8ce225ee863c6dfe0df2d10da27a35407128d7c4691ddb927401465047a6e

13 days agoWhen reducing the truth probability of a LIKE/GLOB constraint, only consider
drh [Mon, 2 Feb 2026 20:54:28 +0000 (20:54 +0000)] 
When reducing the truth probability of a LIKE/GLOB constraint, only consider
non-wildcard characters in the pattern.

FossilOrigin-Name: 2ba8fc290dbc80d159a217d745d8bd62371c305443d5aed10bfcf34cc98d3985

13 days agoDo not reduce the estimated truth probability of LIKE and GLOB operators
drh [Mon, 2 Feb 2026 16:03:24 +0000 (16:03 +0000)] 
Do not reduce the estimated truth probability of LIKE and GLOB operators
by quite so much.  Fix a single test case whose output changed.

FossilOrigin-Name: fdebbedbd9a99165359761106cdc76d327f74043b22806b7bd96402fbed36f14

13 days agoMerge the latest trunk enhancements into the prune-by-like-glob branch.
drh [Mon, 2 Feb 2026 14:24:47 +0000 (14:24 +0000)] 
Merge the latest trunk enhancements into the prune-by-like-glob branch.

FossilOrigin-Name: d9d3d3a807710957f35b023ddc89cb80eea529f654ce3aa0f9aafe6c15b3ce88

2 weeks agoUpdate session module test code to correctly use Tcl_Size instead of int.
dan [Mon, 2 Feb 2026 11:42:19 +0000 (11:42 +0000)] 
Update session module test code to correctly use Tcl_Size instead of int.

FossilOrigin-Name: 619060c2267a889089bf5328ba83640806688164a096df8582a5cf91b173741d

2 weeks agoAdd the "--timeout SECONDS" option to the ".progress" command in the CLI.
drh [Sun, 1 Feb 2026 21:10:04 +0000 (21:10 +0000)] 
Add the "--timeout SECONDS" option to the ".progress" command in the CLI.

FossilOrigin-Name: 8eb5c88aeb37279f68f5bb0b268339a8f6fb0b927b1e398ac4c83bf42c281273

2 weeks agoEnhance the ".timer" command in the CLI to accept the "once" argument, and
drh [Sun, 1 Feb 2026 15:58:37 +0000 (15:58 +0000)] 
Enhance the ".timer" command in the CLI to accept the "once" argument, and
so that it leaves its last real-time result in the $TIMER variable.  Also
fix a harmless warning from an earlier check-in.

FossilOrigin-Name: 8ad7dffc261cbb3f7c9b4d38b04282c805c1c047fb431076f85e577c81f21574

2 weeks agoAn experimental query-planner change that reduces the estimated number
drh [Sun, 1 Feb 2026 00:37:04 +0000 (00:37 +0000)] 
An experimental query-planner change that reduces the estimated number
of output rows for FROM clause terms that are restricted by a LIKE or
GLOB operator, based on the number of bytes in the pattern.  The idea is
that longer patterns will match fewer records and hence should reduce the
estimated output count.  The implementation is not workable as it stands
now.  This is just a crazy idea, saved for future reference.

FossilOrigin-Name: 97bcb56a208af0687750a6438981bbfe36a8d516d996178e62551d302ef811ee

2 weeks agoFix a missed optimization opportunity due to a typo in check-in [898bfa1afd8260ea].
drh [Sat, 31 Jan 2026 02:17:55 +0000 (02:17 +0000)] 
Fix a missed optimization opportunity due to a typo in check-in [898bfa1afd8260ea].
Reported by [forum:/forumpost/2026-01-31T00:49:53z|forum post 2026-01-31T00:49:53z].

FossilOrigin-Name: 3a4f9a323da90611d7eda51b90cb058175ddde0a128e1ff00ce58cc83af0f376

2 weeks agoMake CROSS JOIN a join reorder barrier again, as the SQLite documentation says it...
drh [Fri, 30 Jan 2026 17:10:22 +0000 (17:10 +0000)] 
Make CROSS JOIN a join reorder barrier again, as the SQLite documentation says it is.  It
mistakenly stopped being a join barrier with check-in [c1ea064948ba08c4].

FossilOrigin-Name: d294106ecb78d765305ab740007f4a678e28baa13ae403fe57ea9cbfc259620f

2 weeks agoFix the new CLI so that the ".eqp" setting does not affect the output of other dot
drh [Fri, 30 Jan 2026 16:03:22 +0000 (16:03 +0000)] 
Fix the new CLI so that the ".eqp" setting does not affect the output of other dot
commands such as .schema or .tables.

FossilOrigin-Name: a5a1b69b3feedb507ecfe2e9ddc039d7c01e1bb54e3e881df5010481886cdef9

2 weeks agoChange the new escape-character mechanism for CSV import so that there are
drh [Fri, 30 Jan 2026 13:11:20 +0000 (13:11 +0000)] 
Change the new escape-character mechanism for CSV import so that there are
separate options for an escape character for quoted and unquoted fields of
the CSV.

FossilOrigin-Name: 293ec20e29e46d822a98302f8a0ba52ad6f74a7e93f780536d393730c2edbf61

2 weeks agoUndo the previous check-in. In its place, add the --escape option to
drh [Fri, 30 Jan 2026 12:27:13 +0000 (12:27 +0000)] 
Undo the previous check-in.  In its place, add the --escape option to
the ".import" command.

FossilOrigin-Name: f11a05d52a1eb933f394d48c0d4ee0353f07ad725b7378c40afd01632e67f72d

2 weeks agoEnhance the CSV import capability in the CLI so that it understands
drh [Fri, 30 Jan 2026 12:15:25 +0000 (12:15 +0000)] 
Enhance the CSV import capability in the CLI so that it understands
backslash-escaped double-quotes.

FossilOrigin-Name: 7ba0594d3c24531bc014dd029093b0503118a29cfdd13af2a2ebdd456855ce94

2 weeks agokvvfs fix for [https://github.com/sqlite/sqlite-wasm/issues/146|npm ticket #146]...
stephan [Fri, 30 Jan 2026 06:37:34 +0000 (06:37 +0000)] 
kvvfs fix for [https://github.com/sqlite/sqlite-wasm/issues/146|npm ticket #146]: use of a test-mode-only symbol in non-test runs leads to a null deref in xFileControl().

FossilOrigin-Name: 407724c4e80efdf93d885e95b5209a100a3f470fe0298138be57201f65f9817e

2 weeks agoCapture sqlite3_rsync's remote-end result code so the local side can exit with non...
stephan [Wed, 28 Jan 2026 17:25:18 +0000 (17:25 +0000)] 
Capture sqlite3_rsync's remote-end result code so the local side can exit with non-0 if, e.g., the remote sqlite3_rsync binary is found but fails to start. [forum:43eb1cd1c3979817|Confirmation received] that it resolves the motivating problem report.

FossilOrigin-Name: 971d51374e3bf0d0e0b106750dc1e499d1fdbd3233cf8264a534138b27f8d0a1

2 weeks agoImproved (faster) bytecode for the merge algorithm.
drh [Wed, 28 Jan 2026 16:59:34 +0000 (16:59 +0000)] 
Improved (faster) bytecode for the merge algorithm.

FossilOrigin-Name: 0b7f4b97e68f17ae2fec86017cdb170f3b318a71cda34b5c82ec2d9df780564f

2 weeks agoAdd a comment to sqlite3Stat4Value() explaining that it read a few bytes past the...
dan [Wed, 28 Jan 2026 10:52:53 +0000 (10:52 +0000)] 
Add a comment to sqlite3Stat4Value() explaining that it read a few bytes past the end of the specified buffer.

FossilOrigin-Name: b95644eafdd42293096a3760af8b2110f3c7d83feecdeff5ff9f008d9748e874

2 weeks agoAvoid unsigned integer overflow when evaluating an array index in a
drh [Tue, 27 Jan 2026 23:33:42 +0000 (23:33 +0000)] 
Avoid unsigned integer overflow when evaluating an array index in a
JSON path expression.
[forum:/forumpost/2026-01-27T14:18:49z|Forum post 2026-01-27T14:18:49z].

FossilOrigin-Name: 631c8d44cd1624ddc45babd3f0d810908c2a368784744262042c63506ff2e333

2 weeks agoImproved byte-code coverage testing verification in the merge algorithm.
drh [Tue, 27 Jan 2026 22:27:14 +0000 (22:27 +0000)] 
Improved byte-code coverage testing verification in the merge algorithm.

FossilOrigin-Name: e49ec0e24b4765a6a819f3e980b680b9604f6db21aa8112ec4e9b54d82220c00

2 weeks agoThe tmstmpvfs.c extension should not modify the content of pages going into
drh [Tue, 27 Jan 2026 16:18:35 +0000 (16:18 +0000)] 
The tmstmpvfs.c extension should not modify the content of pages going into
the WAL file, as that would corrupt the page checksum used for recovery.
Instead, only insert timestamp information as content is written into the
database file.

FossilOrigin-Name: dabaeeb1dab82eaea2449658b9c4c74af0058e5a64a076dab046902c6efac292

2 weeks agoTeach sqlite3_rsync to increment its error count when a child process fails, based... rsync-child-rc
stephan [Tue, 27 Jan 2026 16:15:22 +0000 (16:15 +0000)] 
Teach sqlite3_rsync to increment its error count when a child process fails, based on [forum:8fe404e547faa42e|forum post 8fe404e547faa42e]. This passes basic sanity tests but requires more testing and needs a review of the final 'else' block in the new code.

FossilOrigin-Name: 8be55d405f4ce424760150a2b59b5f663041fdcb377d1b9893b4f4e8e1940246

2 weeks agoFor CSV import in the CLI, when the table is created automatically
drh [Tue, 27 Jan 2026 14:59:08 +0000 (14:59 +0000)] 
For CSV import in the CLI, when the table is created automatically
because it does not previously exist, make the column types "ANY"
instead of "TEXT" so that they will automatically adjust to different
datatypes in the input text.

FossilOrigin-Name: aff74e71ea734e1ad8fa893652885fd8c6c432fb60e92913a799e6df5e980b47

2 weeks agoAdd the --csv option to the showtmlog utility program.
drh [Tue, 27 Jan 2026 14:27:19 +0000 (14:27 +0000)] 
Add the --csv option to the showtmlog utility program.

FossilOrigin-Name: 2e96e8efa9a331b0f7d928c55e7d85be64e7c60c85032c1e972f77fe790bdec4

2 weeks agoFix trivial buffer overreads in the sessions module that could occur when parsing...
dan [Tue, 27 Jan 2026 14:00:59 +0000 (14:00 +0000)] 
Fix trivial buffer overreads in the sessions module that could occur when parsing changeset blobs.

FossilOrigin-Name: 661878a62870023f7f54e8c591a0823dc457cb89780ab40c1891fb3d5e8f095f

2 weeks agoAdditional usage notes added to the header comment of the tmstmpvfs.c
drh [Tue, 27 Jan 2026 12:50:52 +0000 (12:50 +0000)] 
Additional usage notes added to the header comment of the tmstmpvfs.c
source file.  No code changes.

FossilOrigin-Name: d1b8e7740bee13a8cf199c6477ee20a4f8bcbbd9ec4096bcdc05a996fadf0d56

2 weeks agoEnhanced documentation in the header comment of tmstmpvfs.c.
drh [Tue, 27 Jan 2026 12:02:02 +0000 (12:02 +0000)] 
Enhanced documentation in the header comment of tmstmpvfs.c.

FossilOrigin-Name: 3d37da3cb5943a61f528e3002c4c3ac3d41e871d742d8e603bffcc4bc5bd42fd

2 weeks agoFix frame number computation in the log generated by tmstmpvfs.c.
drh [Tue, 27 Jan 2026 11:19:49 +0000 (11:19 +0000)] 
Fix frame number computation in the log generated by tmstmpvfs.c.

FossilOrigin-Name: 57fda9dd85f0de8c5d4a4d8015e67982d73ab96ad6f1cd590a48d8995dc28140

2 weeks agoEnhancements to tmstmpvfs.c: (1) Use the exact same timestamp on logfile
drh [Mon, 26 Jan 2026 21:20:28 +0000 (21:20 +0000)] 
Enhancements to tmstmpvfs.c:  (1) Use the exact same timestamp on logfile
entries as on the pages that control, where appropriate.  (2) Include the
WAL frame number in ELOG_CKPT_PAGE logfile entries.

FossilOrigin-Name: fcf16297850abf5186b0d414b4f31d4b515925ef5cca5e7d7d84984c26160d00

2 weeks agoAdd test for fts3 compress= and uncompress= options.
dan [Mon, 26 Jan 2026 20:17:10 +0000 (20:17 +0000)] 
Add test for fts3 compress= and uncompress= options.

FossilOrigin-Name: bace9de67db426017d98f31685da1fc6ab10c7755681a41ca978cc97cb2ad5df

2 weeks agoImprove the comments on the generated byte-code for the merge algorithm.
drh [Mon, 26 Jan 2026 19:37:57 +0000 (19:37 +0000)] 
Improve the comments on the generated byte-code for the merge algorithm.

FossilOrigin-Name: 4468c9e1a262d3d7efd8edff19e22e13b64ebed606ce2f18c9cabce93ef257d3

2 weeks agoFix the initialization of the sqlite3Api[] constant to conform
drh [Mon, 26 Jan 2026 13:54:05 +0000 (13:54 +0000)] 
Fix the initialization of the sqlite3Api[] constant to conform
with the previous check-in.

FossilOrigin-Name: 0a31a740843404958f61798aa17f94b5162bcf467c1c863d745346a316160d13

2 weeks agoAdd alternative sqlite3_carray_bind_v2() interface.
drh [Mon, 26 Jan 2026 13:44:42 +0000 (13:44 +0000)] 
Add alternative sqlite3_carray_bind_v2() interface.

FossilOrigin-Name: 925384d7711867428644595c0903682e6e365eb974c57e6680b51d511c980054

3 weeks agoFix speedtest1.wasm build regression introduced with Emscripten 5.0.0.
stephan [Mon, 26 Jan 2026 10:53:24 +0000 (10:53 +0000)] 
Fix speedtest1.wasm build regression introduced with Emscripten 5.0.0.

FossilOrigin-Name: 4733d351ec2376291f093ba8d2ba71d82c6f100c68dc860eee0532986c154e71

3 weeks agoFix a possible problem following OOM in a WITH statement.
drh [Mon, 26 Jan 2026 00:11:01 +0000 (00:11 +0000)] 
Fix a possible problem following OOM in a WITH statement.

FossilOrigin-Name: c38797d400dc4135108a6e303f2c10779ba9adf0daae28f1789f9106a68d21d5

3 weeks agoAlways use the sort-and-merge algorithm for EXCEPT, INTERSECT, and UNION,
drh [Sun, 25 Jan 2026 23:28:42 +0000 (23:28 +0000)] 
Always use the sort-and-merge algorithm for EXCEPT, INTERSECT, and UNION,
even if there is no ORDER BY clause.

FossilOrigin-Name: 132ba781b031972c6ac564ff0d1d6b2dfaeee77fe503ad6e9e8647bb5ba28bd3

3 weeks agoThe Select.addrOpenEphm field is no longer needed. Remove it and union-by-merge
drh [Sun, 25 Jan 2026 20:15:00 +0000 (20:15 +0000)] 
The Select.addrOpenEphm field is no longer needed.  Remove it and
simplify related code.

FossilOrigin-Name: 1fe5a1ca72892987716b71b9419265f25c8c426e52320acf56724fd64b838be6

3 weeks agoRefactor one function name. Comment improvements. No functional changes.
drh [Sun, 25 Jan 2026 18:21:53 +0000 (18:21 +0000)] 
Refactor one function name.  Comment improvements.  No functional changes.

FossilOrigin-Name: 5b4c0a5e8609e16a4b08b7f95d55e513ee4300b22d044ac8f42e60b96cff5be6

3 weeks agoFix the jsonb_group_array() and jsonb_group_object() functions so that they return
drh [Sun, 25 Jan 2026 15:18:31 +0000 (15:18 +0000)] 
Fix the jsonb_group_array() and jsonb_group_object() functions so that they return
JSONB as they should, and not text JSON, when the array or object is empty.
[forum:/forumpost/2026-01-25T00:47:06z|Forum post 2026-01-25T00:47:06z].

FossilOrigin-Name: 8b53b97833afe27c0c3782c5fbc0437976215b571579f73a94c33e28d3fedb41

3 weeks agoAdditional simplifications to achieve 100% MC/DC.
drh [Sun, 25 Jan 2026 13:26:19 +0000 (13:26 +0000)] 
Additional simplifications to achieve 100% MC/DC.

FossilOrigin-Name: 781b7ec0bcaa5d94e8c5fd31b4fe0203393d5209a5f518848f057ec3d2b8d7ac

3 weeks agoFix harmless compiler warnings in FTS5.
drh [Sun, 25 Jan 2026 11:56:25 +0000 (11:56 +0000)] 
Fix harmless compiler warnings in FTS5.

FossilOrigin-Name: 29d9132a768e0460e22e41abb8b6188181ba0fc6c4665161d3d0af28d7583e19

3 weeks agoRemove additional unnecessary code associated with the setup phase of a recursive...
drh [Sun, 25 Jan 2026 11:41:49 +0000 (11:41 +0000)] 
Remove additional unnecessary code associated with the setup phase of a recursive CTE.

FossilOrigin-Name: 82735513762c8adfe7ad4865dcb76c625cbd8f6976bb98f2c342cf98cfdf3b36

3 weeks agoAssert() statements added to sqlite3_result_text64() and
drh [Sat, 24 Jan 2026 17:18:56 +0000 (17:18 +0000)] 
Assert() statements added to sqlite3_result_text64() and
sqlite3_bind_text64() to detect misuse of SQLITE_UTF8_ZT that can
result in undefined behavior.

FossilOrigin-Name: e761fcc6838aee1fa5e098ad167866845a8ee140a3346fb089a1238abb58d998

3 weeks agoExpound upon the meaning of SQLITE_UTF8_ZT, in an attempt to head off
drh [Sat, 24 Jan 2026 12:19:00 +0000 (12:19 +0000)] 
Expound upon the meaning of SQLITE_UTF8_ZT, in an attempt to head off
confusion.

FossilOrigin-Name: 9a74d0c3e78eef9a32775f445ecb3fae76e2f3886b9173a16971d7c7506967fe

3 weeks agoExpose SQLITE_UTF_ZT to WASM for completeness's sake, but the WASM build does not...
stephan [Sat, 24 Jan 2026 01:17:06 +0000 (01:17 +0000)] 
Expose SQLITE_UTF_ZT to WASM for completeness's sake, but the WASM build does not expose sqlite3_bind_text64() or sqlite3_result_text64() because it only supports UTF8 encoding, so ZT does not currently have a genuine use there.

FossilOrigin-Name: d931831ce9d2dea3730f33afc046e159ad886842114831a6bbe56d5b746ab0af

3 weeks agoFix an incorrect assert().
drh [Sat, 24 Jan 2026 00:33:41 +0000 (00:33 +0000)] 
Fix an incorrect assert().

FossilOrigin-Name: b9ce349e1e4166c3d1c97d2f6fb1792b89e3316c8ec182daa032b6655e9c2c17

3 weeks agoIn the cost metrics of the query planner, the estimated number of output rows
drh [Fri, 23 Jan 2026 20:46:54 +0000 (20:46 +0000)] 
In the cost metrics of the query planner, the estimated number of output rows
from an EXISTS-to-JOIN loop should not be more than 1.
[forum:/forumpost/989880d0aa|Forum post 989880d0aa].

FossilOrigin-Name: fc4e93a381dfb99dddfd2ef001bf56b92ab89ee3c7044c7ce13ad32f38b3f418

3 weeks agoMore code simplifications.
drh [Fri, 23 Jan 2026 18:52:45 +0000 (18:52 +0000)] 
More code simplifications.

FossilOrigin-Name: 3d76732a45333f6f3e21667bb018a859d20815243d276fad0dc126d3c667d4aa

3 weeks agoFix a minor EXPLAIN QUERY PLAN formatting problem. Remove a NEVER() that is
drh [Fri, 23 Jan 2026 17:06:54 +0000 (17:06 +0000)] 
Fix a minor EXPLAIN QUERY PLAN formatting problem.  Remove a NEVER() that is
reachable.

FossilOrigin-Name: 423173079ee0911f86a76c9b905d98328f7aae45d43a38a13957c5c510f87670

3 weeks agoRemove code that is no longer used.
drh [Fri, 23 Jan 2026 16:07:51 +0000 (16:07 +0000)] 
Remove code that is no longer used.

FossilOrigin-Name: 8d7f91e07b0c7573f94fddd64f39671e608969764615bd7f5c060e7ee7540bc6

3 weeks agoContinuing work toward using sort-and-merge for UNION.
drh [Fri, 23 Jan 2026 14:37:08 +0000 (14:37 +0000)] 
Continuing work toward using sort-and-merge for UNION.

FossilOrigin-Name: 94bf43634bbb1fd8e67235b8be0d9744cca1e364ab3cceecca4528e7b78780d1

3 weeks agoMerge the latest trunk enhancements into the union-by-merge branch.
drh [Fri, 23 Jan 2026 11:44:40 +0000 (11:44 +0000)] 
Merge the latest trunk enhancements into the union-by-merge branch.

FossilOrigin-Name: bdf4d6a9398266c98a0d4ad3c60b431cd498bfa80add3e81d717c687634c2602

3 weeks agoAdd the SQLITE_UTF8_ZT value which can be the encoding argument to
drh [Fri, 23 Jan 2026 00:55:36 +0000 (00:55 +0000)] 
Add the SQLITE_UTF8_ZT value which can be the encoding argument to
sqlite3_result_text64() or sqlite3_bind_test64() to indicate that the
argument is UTF-8 text that is zero-terminated.

FossilOrigin-Name: cef0eed8054f3f760cf3142a897c7eead20869157da8b2a0ee9443733eecd371

3 weeks agoMerge the latest trunk enhancements into the utf8-zt branch. utf8-zt
drh [Thu, 22 Jan 2026 19:29:34 +0000 (19:29 +0000)] 
Merge the latest trunk enhancements into the utf8-zt branch.

FossilOrigin-Name: 0dd1633d34a0c6a6d56e32ca3b05bc0aa55e47097f600d1fc9f00022a53681b3

3 weeks agoEnhance the [/info/e33da6d5dc964db8|EXISTS-to-JOIN optimization] so that
drh [Thu, 22 Jan 2026 19:02:32 +0000 (19:02 +0000)] 
Enhance the [/info/e33da6d5dc964db8|EXISTS-to-JOIN optimization] so that
the inserted JOIN terms are not required to be on the inner-most loops,
as long as all dependencies for the EXISTS-to-JOIN loops are in outer
loops.  This addresses the performance concern of
[forum:/forumpost/2026-01-21T19:49:04z|forum post 2026-01-21T19:49:04z].
Test cases in TH3.

FossilOrigin-Name: 298d5c8fa6207afb6cdcca3b312a1eeddda0edeb6d840aa5476a7195047a2158

3 weeks agoFor the ".eqp full" show both the QUERY PLAN and the full byte code, just as
drh [Thu, 22 Jan 2026 15:59:45 +0000 (15:59 +0000)] 
For the ".eqp full" show both the QUERY PLAN and the full byte code, just as
it has in the past.

FossilOrigin-Name: 756484fcaa7efed0691814f3affeb2449d3301c5c764530f2ec8e290caea567f

3 weeks agoAdd a new encoding constant SQLITE_UTF8_ZT, which if used with
drh [Wed, 21 Jan 2026 19:24:07 +0000 (19:24 +0000)] 
Add a new encoding constant SQLITE_UTF8_ZT, which if used with
sqlite3_result_text64() or sqlite3_bind_text64() declares that the
string provided is UTF8 and zero-terminated at the length specified.

FossilOrigin-Name: 2d84ce88fed12766272f6b1293927eb4c7ce92da0334b09b4875ed2dfdd00ade

3 weeks agoAdd a new assert().
drh [Wed, 21 Jan 2026 11:29:20 +0000 (11:29 +0000)] 
Add a new assert().

FossilOrigin-Name: bc450aba674a8934d718a88af3c2343555b43c2d8403bd5f6d14e177fce6bc9f

3 weeks agoStrive to use sort-and-merge for compounds in CTEs.
drh [Tue, 20 Jan 2026 20:10:41 +0000 (20:10 +0000)] 
Strive to use sort-and-merge for compounds in CTEs.

FossilOrigin-Name: 73ed1c790bb386a2981bf7076d23d37e09fa9db3966a7a164b8964fdb14fdad2

3 weeks agoUpdate the shell tool to work with SQLITE_OMIT_AUTOINIT builds.
dan [Tue, 20 Jan 2026 18:30:48 +0000 (18:30 +0000)] 
Update the shell tool to work with SQLITE_OMIT_AUTOINIT builds.

FossilOrigin-Name: 2b3b36da9d60c265dceec5964ea51c752d81f41459fb6849c8faea658b253552

3 weeks agoFix another test case to work with union-by-merge.
drh [Tue, 20 Jan 2026 18:20:26 +0000 (18:20 +0000)] 
Fix another test case to work with union-by-merge.

FossilOrigin-Name: 8279c10e2465838010508f6018aa6fdb0e07ca3639f65e727a03a4222573ea57

3 weeks agoTiny JS doc touchup.
stephan [Tue, 20 Jan 2026 18:07:27 +0000 (18:07 +0000)] 
Tiny JS doc touchup.

FossilOrigin-Name: 6d9ec0a21a2b33a7bb3cf9c3677c9ef7a9738d318cd2d8159b33583b2bd4abec

3 weeks agowasm: make pre-js.c-pp.js a no-op in bundler-friendly builds.
stephan [Tue, 20 Jan 2026 18:01:56 +0000 (18:01 +0000)] 
wasm: make pre-js.c-pp.js a no-op in bundler-friendly builds.

FossilOrigin-Name: 982a91abc0c97e7e785d3ba69a4d0516a899f4d6cd462027ebdf7115e577e8c3

3 weeks agowasm: a potential workaround for cases such as [forum:1eec339854c935bd|forum post...
stephan [Tue, 20 Jan 2026 17:10:22 +0000 (17:10 +0000)] 
wasm: a potential workaround for cases such as [forum:1eec339854c935bd|forum post 1eec339854c935bd], where client-local needs require overriding Emscripten config defaults (which we very intentionally do not document or support for reasons explained in that thread). This is untested because it requires a special-needs setup, but it doesn't break anything for run-of-the-mill cases.

FossilOrigin-Name: c8e6be9241e3e17898c451baad109b75dc8a97a91ff1e43c67a6c962b75af8f3

3 weeks agoMinor fixes. Tests are passing now.
drh [Tue, 20 Jan 2026 15:07:28 +0000 (15:07 +0000)] 
Minor fixes.  Tests are passing now.

FossilOrigin-Name: 305ae331f5e791941c12b04b727656ac8d80f7c5cb6343277b979a456eb3b834

3 weeks agoAdd an SQLITE_API_ARMOR check to sqlite3_get_clientdata(), per request in [forum...
stephan [Tue, 20 Jan 2026 10:57:44 +0000 (10:57 +0000)] 
Add an SQLITE_API_ARMOR check to sqlite3_get_clientdata(), per request in [forum:a011a001f4|forum post a011a001f4].

FossilOrigin-Name: 346ad366a8ebed1e7936c59f8a40e9c8e7e31d0153bc4f654a47b2ddc39b18ca

3 weeks agoMinor doc updates in mkwasmbuilds.c.
stephan [Mon, 19 Jan 2026 22:20:12 +0000 (22:20 +0000)] 
Minor doc updates in mkwasmbuilds.c.

FossilOrigin-Name: 81840bd4b2132c1c701bb6fd5a2ac48a4ed33d2b68a3f7a826fa32dc0fc16483

3 weeks agowasm: remove the bundler-friend builds from the 'all' target, as they're only needed...
stephan [Mon, 19 Jan 2026 22:01:10 +0000 (22:01 +0000)] 
wasm: remove the bundler-friend builds from the 'all' target, as they're only needed for the 'npm' target.

FossilOrigin-Name: dfe4b788ca6596ea9f26445c864f56f81c7816798f5fedfc4e89ba1eb097b0aa

3 weeks agoMinor doc touchups in the opfs-sahpool VFS. No functional changes.
stephan [Mon, 19 Jan 2026 21:57:32 +0000 (21:57 +0000)] 
Minor doc touchups in the opfs-sahpool VFS. No functional changes.

FossilOrigin-Name: 67c0d11701842baaa5227ccce02483ead07bec8426b9861f2e2a0465414ae382

3 weeks agoBe more aggressive about using a sort-and-merge to compute the UNION of
drh [Mon, 19 Jan 2026 19:51:03 +0000 (19:51 +0000)] 
Be more aggressive about using a sort-and-merge to compute the UNION of
two SELECT statements.  Experimental branch.  This check-in is failing some
tests.

FossilOrigin-Name: e534af8a78f5458bd656f70eb9f68084c0ed3f97360f5a033fba3564849e970c

4 weeks agoAdd two new JSON functions: json_array_insert() and jsonb_array_insert().
drh [Mon, 19 Jan 2026 11:44:59 +0000 (11:44 +0000)] 
Add two new JSON functions: json_array_insert() and jsonb_array_insert().
Patterned after the json_array_insert() function of MySQL.
[forum:/forumpost/2026-01-17T10:40:39z|Forum thread 2026-01-17T10:40:39z].

FossilOrigin-Name: c1e55132410a80d37bad30e4ddecc7a98fad92a68b436880324998af1cee37ae

4 weeks agoRaise an error if any PATH argument to json_array_insert() is not the path json_array_insert
drh [Sat, 17 Jan 2026 19:01:37 +0000 (19:01 +0000)] 
Raise an error if any PATH argument to json_array_insert() is not the path
of an array element.  Add some test cases for json_array_insert().

FossilOrigin-Name: 96b7d2c60a3f8a9f9d69313bad599a3a5ad335cb382263e4254e2d20929d5e55

4 weeks agoAdd new SQL function: json_array_insert(). Suggested in
drh [Sat, 17 Jan 2026 14:23:28 +0000 (14:23 +0000)] 
Add new SQL function: json_array_insert().  Suggested in
[forum:/forumpost/2026-01-17T10:40:39z|forum thread 2026-01-17T10:40:39z].
This check-in seems to work, but contains no test cases.  Also, no error
is raised if the PATH does not reference an array.  Prototype only.

FossilOrigin-Name: d6c82c8248f8b1ce3d2c01a92e7d1058beac2b2ccac3b122a2cd385c77dc76df

4 weeks agoFix further problems with deleting from corrupt fts5 databases in secure-delete mode.
dan [Fri, 16 Jan 2026 20:04:04 +0000 (20:04 +0000)] 
Fix further problems with deleting from corrupt fts5 databases in secure-delete mode.

FossilOrigin-Name: f8f89d2e10f06b54acf58a3b0543aef749c3d2b65670d4cc71530dea7997651e

4 weeks agoTry to prevent false positives in fuzzinvariants.c due to scalar subqueries.
drh [Fri, 16 Jan 2026 17:48:46 +0000 (17:48 +0000)] 
Try to prevent false positives in fuzzinvariants.c due to scalar subqueries.

FossilOrigin-Name: c20be882a62e75abc50fd2dcae26ebbe83a01f09369525392fa22223627a04ea

4 weeks agoThe optimization at [8bdda827a3d26800] is incorrect for the case where one
drh [Fri, 16 Jan 2026 15:53:20 +0000 (15:53 +0000)] 
The optimization at [8bdda827a3d26800] is incorrect for the case where one
of the two expressions has been commuted such that the collating sequence
has changed.  This check-in fixes the problem.  Problem reported by
[forum:/forumpost/2026-01-16T11:35:28Z|forum post 2026-01-16T11:35:28Z].

FossilOrigin-Name: 9d8fb7a9e23d5ef76d05824401976247debe51be6f658f132609257a068a73de

4 weeks agoChange the copyright on the tool/dbtotxt.c source code file to the
drh [Fri, 16 Jan 2026 12:13:42 +0000 (12:13 +0000)] 
Change the copyright on the tool/dbtotxt.c source code file to the
standard SQLite blessing.

FossilOrigin-Name: 766c89e009578aa5c1a92cbb2dcc34b3529cf4dd6157f07c84f08470d81942a9

4 weeks agoFix an error in new test script fts5corrupt9.test.
dan [Thu, 15 Jan 2026 17:17:00 +0000 (17:17 +0000)] 
Fix an error in new test script fts5corrupt9.test.

FossilOrigin-Name: a5918835e172fd4eda6511d297b61368952d617eac33950b67368671e3bd40fe

4 weeks agoAdd extra test for handling corrupt delta records in rbu. artiphishell
dan [Thu, 15 Jan 2026 17:00:58 +0000 (17:00 +0000)] 
Add extra test for handling corrupt delta records in rbu.

FossilOrigin-Name: 7dba05100fbef3614e6ee8eff39dab7a4713550e5672c2f6cf8f4b490a96aa25

4 weeks agoFix a buffer overrun that could occur when deleting rows in secure-delete mode from...
dan [Thu, 15 Jan 2026 16:09:35 +0000 (16:09 +0000)] 
Fix a buffer overrun that could occur when deleting rows in secure-delete mode from a strategically corrupted fts5 database.

FossilOrigin-Name: 1e66d6e3276cc6aab4d002a1df13b044e61f3946322bf97cac06d98dbb68e433

4 weeks agoAdjust the output of the fuzzcheck test program so that testrunner.tcl can
drh [Wed, 14 Jan 2026 19:22:36 +0000 (19:22 +0000)] 
Adjust the output of the fuzzcheck test program so that testrunner.tcl can
capture the number of tests run even when the --slice option is used.

FossilOrigin-Name: dddaeff4ce552f3aa57cc6e18ed35051138b591338242df5f3af39e24006a834

4 weeks agoUpdate sessions module so that it takes the db mutex before, instead of just after...
dan [Wed, 14 Jan 2026 17:52:27 +0000 (17:52 +0000)] 
Update sessions module so that it takes the db mutex before, instead of just after, opening a savepoint when generating a changeset.

FossilOrigin-Name: 41bbd13d737d2b7879d906b6fa76df42c6ee142f1a7acdafd26da0063bc90baf

4 weeks agoGuard against oversized index entries in databases larger than 2GiB.
drh [Wed, 14 Jan 2026 13:43:32 +0000 (13:43 +0000)] 
Guard against oversized index entries in databases larger than 2GiB.

FossilOrigin-Name: ed17a878e5a2e0cd1e9b69d528f5ac2ba8452d7c83deaf3cc72ecbff054f5ca3

4 weeks agoFix integer overflow problems and error reporting memory leaks in
drh [Tue, 13 Jan 2026 02:35:19 +0000 (02:35 +0000)] 
Fix integer overflow problems and error reporting memory leaks in
the zipfile extension.
[forum:/forumpost/2026-01-13T00:09:06Z|Forum post 2026-01-13T00:09:06Z].

FossilOrigin-Name: 8e656a483557bc5385219d560b9155c232e7dc9d62642249abc879fb37bacd2a

4 weeks agoFix an OOB read in the sessions module that could occur while processing a corrupt...
dan [Mon, 12 Jan 2026 20:16:04 +0000 (20:16 +0000)] 
Fix an OOB read in the sessions module that could occur while processing a corrupt changeset.

FossilOrigin-Name: 3c46295487f089a891f566cae43b67ce97794bb60645d5806285600e05eff456

4 weeks agoAvoid unsigned integer overflow in the delta_apply() extension function.
drh [Mon, 12 Jan 2026 19:56:00 +0000 (19:56 +0000)] 
Avoid unsigned integer overflow in the delta_apply() extension function.
Not part of any standard deliverable.
[forum:/forumpost/d41879b367c7f7ec|Forum thread d41879b367c7f7ec].

FossilOrigin-Name: b354dd12c25c820c04b08e0be4ba8c095fc648dfb4b71345aacce50a17fd269a

4 weeks agoFix an infinite loop in the sessions module that could occur when processing a corrup...
dan [Mon, 12 Jan 2026 19:13:09 +0000 (19:13 +0000)] 
Fix an infinite loop in the sessions module that could occur when processing a corrupt changeset blob.

FossilOrigin-Name: d98653bdbc9781970f1c5d66f69c81c93ad14549223ceae02e74c1b99ab05377

4 weeks agowasm: filter the custom Module.instantiateWasm() out of node builds, per request...
stephan [Mon, 12 Jan 2026 15:43:18 +0000 (15:43 +0000)] 
wasm: filter the custom Module.instantiateWasm() out of node builds, per request from the npm project.

FossilOrigin-Name: b57a8215f4259a0aae188b7ee5060f8ff48919303179aae80b58b43ed3b991f5

4 weeks agoImproved documentation (in the header comment) for tmstmpvfs.c.
drh [Mon, 12 Jan 2026 14:45:55 +0000 (14:45 +0000)] 
Improved documentation (in the header comment) for tmstmpvfs.c.

FossilOrigin-Name: 70b1da718c176b8eb154fe087af4352eb6f55c9c0d1f09fc625d073d9f8075f4

5 weeks agoAdd sqlite3_carray_bind() to sqlite3_api_routines. [forum:257e642a4c|Forum post 257e6...
stephan [Sun, 11 Jan 2026 21:18:23 +0000 (21:18 +0000)] 
Add sqlite3_carray_bind() to sqlite3_api_routines. [forum:257e642a4c|Forum post 257e642a4c].

FossilOrigin-Name: 7c40dbcec8843f6189549a25dcfa8475f53212de8b0de81e10fd6687ef8fae9e

5 weeks agoAdd the @preserve tag to the standalone file sqlite3-opfs-async-proxy.js.
stephan [Sun, 11 Jan 2026 16:21:32 +0000 (16:21 +0000)] 
Add the @preserve tag to the standalone file sqlite3-opfs-async-proxy.js.

FossilOrigin-Name: 334b2be57e752672cfcaf764e3bc73e3d00a0a5174e8ef7c3d83c26136bccaf5

5 weeks agowasm: add @preserve tags to two comment blocks (license header and build version...
stephan [Sun, 11 Jan 2026 14:14:16 +0000 (14:14 +0000)] 
wasm: add @preserve tags to two comment blocks (license header and build version info) so that the npm tools know to retain those comments when minifying.

FossilOrigin-Name: 596f1ea084e78843aa668d3a197690929848d474e55ff7b1444f78bd11f116b1

5 weeks agoUpdate speedtest.md to point out xdg-open on Linux.
stephan [Sat, 10 Jan 2026 14:12:40 +0000 (14:12 +0000)] 
Update speedtest.md to point out xdg-open on Linux.

FossilOrigin-Name: 47c7fbcb46df5a657ec76dff9a370aea9e7d0d95406b1e124e9fe527cf85350d

5 weeks agoFix a help text typo in speedtest1.tcl, pointed out off-list by BrickViking.
stephan [Sat, 10 Jan 2026 00:38:00 +0000 (00:38 +0000)] 
Fix a help text typo in speedtest1.tcl, pointed out off-list by BrickViking.

FossilOrigin-Name: 1fd02a75a914f131948fe06fc99f851d3e226f9f1270e25393d79c493c28a347

5 weeks agoAdd the 'npm' ext/wasm makefile target to create npm-bundle.zip for use by the downst...
stephan [Fri, 9 Jan 2026 19:44:31 +0000 (19:44 +0000)] 
Add the 'npm' ext/wasm makefile target to create npm-bundle.zip for use by the downstream npm package. This target is intended to become their path for pulling npm-relevant deliverables, rather than the canonical downloads, and they have our/my commitment not to break it without involving them first.

FossilOrigin-Name: a4752c18a85bee0cef61ee5ac7911661c1894fb861412c957692069195a001a5

5 weeks agoFix the wasm snapshot build's zipfile name to include '-snapshot' and correct the...
stephan [Fri, 9 Jan 2026 18:42:27 +0000 (18:42 +0000)] 
Fix the wasm snapshot build's zipfile name to include '-snapshot' and correct the update-docs target for recent build refactoring.

FossilOrigin-Name: 0f53dbf06010f66ba23941ee4269d507efa370f1a8cc0099d274d8baadebdb46

5 weeks agoFix potential OOB read on the undocumented test function rtreenode() that
drh [Fri, 9 Jan 2026 00:41:35 +0000 (00:41 +0000)] 
Fix potential OOB read on the undocumented test function rtreenode() that
is part of the RTREE extension, as described in
[forum:/forumpost/2026-01-08T23:32:19Z|forum post 2026-01-08T23:32:19Z].
The problem is almost certainly harmless since any memory allocation will
be a multiple of 8 bytes, and once the input buffer size gets rounded up to
the next multiple of 8 bytes, the access will still be within bounds.
Nevertheless, it still needs to be fixed.

FossilOrigin-Name: 9adab8b2bef4130abd358d53384cb5f4dd691b808336bb7102793b0165b1c516

5 weeks agoEnhance VACUUM INTO so that if a URI filename is used as the target and that
drh [Thu, 8 Jan 2026 20:29:02 +0000 (20:29 +0000)] 
Enhance VACUUM INTO so that if a URI filename is used as the target and that
filename as a reserve=N query parameter with N between 0 and 255, then the
reserve amount for the generated database copy is set to N.  This simplifies
making a copy of a database file with a reduced or reset reserve.

FossilOrigin-Name: a482f9836597de55a9b58fddd3ca2963b8c67ecefef1e34a8c079a2d76f287d0

5 weeks agoIn the reserve=N query parameter on the VACUUM INTO target file, the reset-reserve
drh [Thu, 8 Jan 2026 20:20:03 +0000 (20:20 +0000)] 
In the reserve=N query parameter on the VACUUM INTO target file, the
parameter is a silent no-op if N is out of range.

FossilOrigin-Name: 48e59a27330932cf29bcbd01080757b82ea4a03f5a9e1fa7da076dbfcb7f60e3