]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
9 months agoTypo fixes. Make sqlite3_set_errmsg() accessible to run-time loadable sqlite3-set-errmsg
drh [Fri, 12 Sep 2025 15:31:33 +0000 (15:31 +0000)] 
Typo fixes.  Make sqlite3_set_errmsg() accessible to run-time loadable
extensions.

FossilOrigin-Name: 93a41e31322eec70476f7d81f4af7fb8476cad21a56d6b1048a9e0c0c440bf72

9 months agoAdd more details to comments in the previous check-in.
drh [Fri, 12 Sep 2025 15:20:39 +0000 (15:20 +0000)] 
Add more details to comments in the previous check-in.

FossilOrigin-Name: ed36b3aa4b68c6bb347b6851ea61bcad9712c4a9ed39e3fb4f84cb9b9ee48dc2

9 months agoAdd experimental API sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to...
dan [Fri, 12 Sep 2025 15:02:47 +0000 (15:02 +0000)] 
Add experimental API sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to return any error code and error message via the SQLite handle.

FossilOrigin-Name: 4d5b60a1e57448f03af2a657fe7cdabb04ebaf9688d5cc700dd8f9892a5cba15

9 months agoFix an off-by-one error in sqlite3_rsync.
drh [Thu, 11 Sep 2025 10:58:49 +0000 (10:58 +0000)] 
Fix an off-by-one error in sqlite3_rsync.
[forum:/info/46753431d4|Forum post 46753431d4].

FossilOrigin-Name: ef3b7be6f2037871f6f1b1944fed3dda28216e7f179080d3be2e2620c031f48c

9 months agoImproved support for VxWorks.
drh [Thu, 11 Sep 2025 10:43:57 +0000 (10:43 +0000)] 
Improved support for VxWorks.

FossilOrigin-Name: 5bc6b9352236df3091ee69b947d0c397264156539d13e5968ec3b9a6e55dc800

9 months agoFix a harmless compiler warning in the CLI. Gcc generates identical
drh [Thu, 11 Sep 2025 10:37:01 +0000 (10:37 +0000)] 
Fix a harmless compiler warning in the CLI.  Gcc generates identical
machine code before and after this change.
[forum:/forumpost/8bda0d896f|Forum post 8bda0d896f].

FossilOrigin-Name: dbca4fe34467653d083de42d0c75746cf171e96ee3867abe67a47ab88437fa71

9 months agoLatest upstream autosetup, with project-local s/--debug/--autodebug-debug/ patch...
stephan [Thu, 11 Sep 2025 10:14:10 +0000 (10:14 +0000)] 
Latest upstream autosetup, with project-local s/--debug/--autodebug-debug/ patch, for HP-UX-specific config bootstrapping code and latest jimsh.

FossilOrigin-Name: 1d2352a16cc0990037710b4a666f2f3b039c1973e0af29990d67d70bcdba0600

9 months agoConfigure script portability improvements for HP-UX builds, with the help of HP-UX...
stephan [Thu, 11 Sep 2025 10:09:43 +0000 (10:09 +0000)] 
Configure script portability improvements for HP-UX builds, with the help of HP-UX sysadmin Michael Osipov.

FossilOrigin-Name: 93cf2afa8ca529784f859da2f015bce3a251b23dafa6ca3d1db644a91969e237

9 months agoIn mkautoconfamal.sh use $MAKE if it's set so that it can be made to work on platform...
stephan [Thu, 11 Sep 2025 10:08:19 +0000 (10:08 +0000)] 
In mkautoconfamal.sh use $MAKE if it's set so that it can be made to work on platforms where 'make' from the PATH is not usable, e.g. HP-UX's standard make. This means that 'make snapshot-tarball' will inherit that value from the outer makefile and set it appropriate when the in-use make is named gmake.

FossilOrigin-Name: a8635cae05d2bce28d0c0c39b599cf8ca6f3b89b114fbeef519a8024692180c5

9 months agoMinor #ifdef changes to the carray.c extension so that the source file can
drh [Wed, 10 Sep 2025 20:28:57 +0000 (20:28 +0000)] 
Minor #ifdef changes to the carray.c extension so that the source file can
be more easily imported into a larger program (such as TH3).

FossilOrigin-Name: f16fd1afbb65f88d7b94c2488ddd59549d71894ab5fcee46b4c55bfe646bfc9d

9 months agoUse a separate mutex (SQLITE_MUTEX_STATIC_VFS2) for the VxWorks file list vxworks
drh [Wed, 10 Sep 2025 18:34:09 +0000 (18:34 +0000)] 
Use a separate mutex (SQLITE_MUTEX_STATIC_VFS2) for the VxWorks file list
in os_unix.c.

FossilOrigin-Name: 8f45f1a9d9208fbf124c4087092718b83cd653126bc1ed5f388e3577561f615b

9 months agoChange the order of some paragraphs within documentation comments in sqlite3session.h.
dan [Wed, 10 Sep 2025 16:57:57 +0000 (16:57 +0000)] 
Change the order of some paragraphs within documentation comments in sqlite3session.h.

FossilOrigin-Name: f0102d7b25d854b5a937eb7de5e25f52c2ecf904234857c96bd1995f5dde0b66

9 months agoThe GetSystemTimePreciseAsFileTime() API does not exist on 32-bit windows.
drh [Wed, 10 Sep 2025 14:28:07 +0000 (14:28 +0000)] 
The GetSystemTimePreciseAsFileTime() API does not exist on 32-bit windows.
Adjust [c5dbe93114d318fe] so that it works with this limitation.

FossilOrigin-Name: 61d9e204c5801a94811fdb0afe2c04f9814e08f2e141afa6dbda0fa45f026f70

9 months agoIf open files in VxWorks, do not unlink the file unless the file was marked
drh [Tue, 9 Sep 2025 19:00:55 +0000 (19:00 +0000)] 
If open files in VxWorks, do not unlink the file unless the file was marked
as delete-on-close.

FossilOrigin-Name: bb6114dbbf3bfbea57cd9be21666299663e94576b0175f6aeefd1d0f7107398e

9 months agoDo not allow attempts to open files in VxWorks unless the full pathname is
drh [Tue, 9 Sep 2025 17:39:28 +0000 (17:39 +0000)] 
Do not allow attempts to open files in VxWorks unless the full pathname is
provided.

FossilOrigin-Name: 4720205249214c01f6e63738e4927c0f53c853346cc2dfa45522aaa469f4d702

9 months agoDo not allow the local_getline() function in the CLI to allocate more
drh [Tue, 9 Sep 2025 10:28:06 +0000 (10:28 +0000)] 
Do not allow the local_getline() function in the CLI to allocate more
memory than can be counted using a 32-bit integer, thus limiting the
length of an input line to about one gigabyte.
[forum:/forumpost/c83b9affa2|Forum post c83b9affa2].

FossilOrigin-Name: 0f31711591c56f3896fb6f092752fb82c4ea646bf8e5838dfbe55302994ea091

9 months agoFix a potential memory leak in the VxWorks VFS that can occur following
drh [Mon, 8 Sep 2025 19:56:14 +0000 (19:56 +0000)] 
Fix a potential memory leak in the VxWorks VFS that can occur following
an OOM or I/O error during xOpen().

FossilOrigin-Name: cb880145d899832cca0612b89024a54d188ed706600fa812ea74587d69c261be

9 months agoIn VxWorks, temporary filenames must be full absolute pathnames in order for
drh [Mon, 8 Sep 2025 18:45:58 +0000 (18:45 +0000)] 
In VxWorks, temporary filenames must be full absolute pathnames in order for
vxworksFindFileId() to work.

FossilOrigin-Name: 1fc94becc5971812c3a91fb1410cb54f6ecb9e50da2d30863dc840cbf4e6c1f5

9 months agoAdd the ability to compile with -DOS_VXWORKS=1 on Linux systems, in an
drh [Mon, 8 Sep 2025 17:52:17 +0000 (17:52 +0000)] 
Add the ability to compile with -DOS_VXWORKS=1 on Linux systems, in an
effort to debug the VxWorks capabilities without actually having to
run VxWorks.

FossilOrigin-Name: c87e68d791215729fb513c651e77c6ef6bb260deff37ed2ab6e99b777271bdfe

9 months agoAdd "PRAGMA wal_checkpoint = noop" and SQLITE_CHECKPOINT_NOOP. To request a checkpoin...
dan [Mon, 8 Sep 2025 15:15:24 +0000 (15:15 +0000)] 
Add "PRAGMA wal_checkpoint = noop" and SQLITE_CHECKPOINT_NOOP. To request a checkpoint that checkpoints zero frames.

FossilOrigin-Name: 4384ad8918801780f2660817dead919020423eb94aa880fff9b04f2d5f5d932f

9 months agoMerge trunk changes into this branch. wal-checkpoint-noop
dan [Mon, 8 Sep 2025 14:40:17 +0000 (14:40 +0000)] 
Merge trunk changes into this branch.

FossilOrigin-Name: 3bac76a86baae830d4fdc9e4055470d84549fde56b4cf217ebd96cb486554461

9 months agoAdd documentation comment for SQLITE_CHECKPOINT_NOOP.
dan [Mon, 8 Sep 2025 14:32:32 +0000 (14:32 +0000)] 
Add documentation comment for SQLITE_CHECKPOINT_NOOP.

FossilOrigin-Name: 2b9c495d02724f19ab16612b0e671dfc612f04342222d9901cd0debd08da4cf0

9 months agoImprove documentation of SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.
dan [Sat, 6 Sep 2025 15:27:01 +0000 (15:27 +0000)] 
Improve documentation of SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.

FossilOrigin-Name: d7b2fb5363203f475887f277aed4a91e5a83440c169a86b3bf1e4fdf130bbaed

10 months agoWAL API doc tweaks based on suggestions from [forum:16e94b4bdcfbdc57|forum post 16e94...
stephan [Fri, 5 Sep 2025 13:26:24 +0000 (13:26 +0000)] 
WAL API doc tweaks based on suggestions from [forum:16e94b4bdcfbdc57|forum post 16e94b4bdcf].

FossilOrigin-Name: 1bb7eaf784687cd877c5c0552bb511659767670259e64bc108e7972e356d3cfc

10 months agoBuild portability fixes for HP-UX, reported in [forum:d80ecdaddd885149 | forum post...
stephan [Fri, 5 Sep 2025 12:14:22 +0000 (12:14 +0000)] 
Build portability fixes for HP-UX, reported in [forum:d80ecdaddd885149 | forum post d80ecdaddd8]. The full fix also requires a patch to autosetup/cc-shared.tcl, but that's pending because it's upstream code.

FossilOrigin-Name: 5f38c8aa8fe9993cafde69a85e96e32c283a6bc142238a9d10f3637c93cd474b

10 months agoAdd tests to check that SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER is working.
dan [Fri, 5 Sep 2025 11:20:11 +0000 (11:20 +0000)] 
Add tests to check that SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER is working.

FossilOrigin-Name: beb092d8105e5a1ce95339527bf96799e2ce073591b055f71a5f1dc1d0a0c49c

10 months agoAdd "PRAGMA wal_checkpoint = noop" and SQLITE_CHECKPOINT_NOOP. To request a checkpoin...
dan [Thu, 4 Sep 2025 19:33:23 +0000 (19:33 +0000)] 
Add "PRAGMA wal_checkpoint = noop" and SQLITE_CHECKPOINT_NOOP. To request a checkpoint that checkpoints zero frames.

FossilOrigin-Name: 48be3d020cf0c732557b3d956198a1abcab79424be03f447e2bb89f4d68dc8ff

10 months agoGeneric doc updates in ext/wasm's makefiles. No functional changes.
stephan [Thu, 4 Sep 2025 18:00:53 +0000 (18:00 +0000)] 
Generic doc updates in ext/wasm's makefiles. No functional changes.

FossilOrigin-Name: 02721457cea255a5117a46b77cc87d2e09acb64340ce94089c5b5e6edc5b5033

10 months agoUse Pgno instead of int for the pgno field in the DbpageCursor object.
drh [Thu, 4 Sep 2025 09:26:53 +0000 (09:26 +0000)] 
Use Pgno instead of int for the pgno field in the DbpageCursor object.
The same machine code is generated, but using an unsigned value seems
safer in the long run.
[forum:/forumpost/ccec20a858|Forum post ccec20a858].

FossilOrigin-Name: 26ecdde06cce063143144a79c0b4979ed5ec27548da6f127176a420c1c3f17ce

10 months agoFix a typo in a comment in carray.h.
dan [Wed, 3 Sep 2025 21:19:11 +0000 (21:19 +0000)] 
Fix a typo in a comment in carray.h.

FossilOrigin-Name: a4e137de0e82fbba890c2a608578f02f3666d2c25fb76f95ddf2d6a096a30e6c

10 months agoRandom wasm internal doc cleanups. No code changes.
stephan [Wed, 3 Sep 2025 13:39:15 +0000 (13:39 +0000)] 
Random wasm internal doc cleanups. No code changes.

FossilOrigin-Name: 70923a00cfca2c64b7c7c824325ab75cdd05d452b79d2eaf43297898af891c47

10 months agoAdd test case for pushing WHERE constraints into a UNION sub-query that uses virtual...
dan [Tue, 2 Sep 2025 14:59:16 +0000 (14:59 +0000)] 
Add test case for pushing WHERE constraints into a UNION sub-query that uses virtual tables.

FossilOrigin-Name: 13c80e903ee7f178528918716b11fc0b57fc50b923dcd8aeabf9e6e04e93cdae

10 months agoLatest side-stream autosetup/proj.tcl for improved compile-commands feature detection.
stephan [Mon, 1 Sep 2025 13:01:20 +0000 (13:01 +0000)] 
Latest side-stream autosetup/proj.tcl for improved compile-commands feature detection.

FossilOrigin-Name: 55744ca8b8f2f95ba8bd3e01ef89e21e26c8547912c9d5637afe772d17f34486

10 months agoFix a line-wrap change made in [50234bc9e9fe58da] which broke the docsrc build by...
stephan [Mon, 1 Sep 2025 00:32:43 +0000 (00:32 +0000)] 
Fix a line-wrap change made in [50234bc9e9fe58da] which broke the docsrc build by splitting a link reference across two lines, which the doc processor does not like. Problem reported in [forum:ea1fe5f421549899 | forum post ea1fe5f4215].

FossilOrigin-Name: 321938063e2d6c579b992bbbed5210c8a051a8b2fe858bb88f95dbd8fb0f35dc

10 months agoUpdate test script reservebytes.test so that it works with the "prepare" permutation.
dan [Fri, 29 Aug 2025 16:51:16 +0000 (16:51 +0000)] 
Update test script reservebytes.test so that it works with the "prepare" permutation.

FossilOrigin-Name: 4ac774364b693a4b992c997c64bf425e2765133a7a25963cbf2b02c180eeaba5

10 months agoEnsure POSIX builds work as expected (no extra usleep() calls) if SQLITE_ENABLE_SETLK...
dan [Fri, 29 Aug 2025 15:56:38 +0000 (15:56 +0000)] 
Ensure POSIX builds work as expected (no extra usleep() calls) if SQLITE_ENABLE_SETLK_TIMEOUT is defined.

FossilOrigin-Name: f04a826bac1620b28c32252fa2ceaccc5dfbb21405a6a98942f95d3d1ca89acb

10 months agoAdd 'from a check-out' to the mksqlite3h.tcl manifest instructions.
stephan [Fri, 29 Aug 2025 11:21:08 +0000 (11:21 +0000)] 
Add 'from a check-out' to the mksqlite3h.tcl manifest instructions.

FossilOrigin-Name: 7728a74ca87934c333a66e46dc1f88ce572473e345d9ff20e5d566c0e26da82d

10 months agoFix the mksqlite3h.tcl SQLITE_SCM_... changes to work from out-of-tree builds. Proble...
stephan [Fri, 29 Aug 2025 11:09:20 +0000 (11:09 +0000)] 
Fix the mksqlite3h.tcl SQLITE_SCM_... changes to work from out-of-tree builds. Problem reported in [forum:812f8d6ff4|forum post 812f8d6ff4].

FossilOrigin-Name: 127f0ab16370fe02b4456669bf60e45ce8c96c4e24b2db3080eaf376d77e0df8

10 months agoRemove some commented-out debugging lines and fix a doc typo. No code changes.
stephan [Thu, 28 Aug 2025 17:10:44 +0000 (17:10 +0000)] 
Remove some commented-out debugging lines and fix a doc typo. No code changes.

FossilOrigin-Name: af32cb3e30ee527a89768b98d8646e2b25d3fb642e61e805187bb3e4613b0960

10 months agoAdd macros SQLITE_SCM_BRANCH/TAGS/DATETIME to sqlite3.h, pulled from the fossil-gener...
stephan [Thu, 28 Aug 2025 17:05:37 +0000 (17:05 +0000)] 
Add macros SQLITE_SCM_BRANCH/TAGS/DATETIME to sqlite3.h, pulled from the fossil-generated manifest.tags.

FossilOrigin-Name: db6b6240ad465f865dd2ca8fa0cdfba8b5315c45041b91b76efade6427c213e1

10 months agoRemove sqlite3expert.h from the compiler invocation for that tool, as it (A) doesn...
stephan [Thu, 28 Aug 2025 15:04:52 +0000 (15:04 +0000)] 
Remove sqlite3expert.h from the compiler invocation for that tool, as it (A) doesn't need to be there and (B) it causes some compilers problems (as reported in [forum:a1085109e7db4cf3 | forum post a1085109e7]). This bug was faithfully carried over from the legacy build.

FossilOrigin-Name: 9f0a16f6e893d51f760a8c1e2cb4709fdd16ccb2c0258695767f8305f407f4ac

10 months agoAdd test to ensure that changing the number of reserved bytes in a database using...
dan [Wed, 27 Aug 2025 11:21:44 +0000 (11:21 +0000)] 
Add test to ensure that changing the number of reserved bytes in a database using VACUUM does not confuse other connections in stock SQLite.

FossilOrigin-Name: 6bf54bbc4d503e8ebeb804dfb318383770e85d434dacbbbd8f6dadc7595b1856

10 months agoFix a typo in a comment.
dan [Mon, 25 Aug 2025 16:41:04 +0000 (16:41 +0000)] 
Fix a typo in a comment.

FossilOrigin-Name: d2a74d5c36f600fa8d7dc03f6914482a2afca6e4ff557a0007d14f4304645ba1

10 months agoCheck that certain ON clauses do not refer to tables to their right as a separate...
dan [Mon, 25 Aug 2025 14:27:31 +0000 (14:27 +0000)] 
Check that certain ON clauses do not refer to tables to their right as a separate step after parsing a SELECT statement, instead of as part of the planner stage. For for [forum:ccfb3b5052 | forum post ccfb3b5052].

FossilOrigin-Name: e0beda7ffe92abf6322db8314c42940adab7f89a35d38124355cb3464ee70b9f

10 months agoFor the --pagecache option of the CLI, if the SIZE parameter is a
drh [Mon, 25 Aug 2025 13:04:26 +0000 (13:04 +0000)] 
For the --pagecache option of the CLI, if the SIZE parameter is a
power-of-two, automatically round it up to using the PCACHE_HDRSZ.

FossilOrigin-Name: e7a2ba842cb571df66d204b8d5989ecdc78be7205fdaf1de1783c63c9118d465

10 months agoAdd test case to this branch to show that it handles cases where ON clauses use selec... on-clause-fix-3rd-try
dan [Mon, 25 Aug 2025 11:47:15 +0000 (11:47 +0000)] 
Add test case to this branch to show that it handles cases where ON clauses use select-list aliases to refer to columns to their right.

FossilOrigin-Name: 4d34ab4acf0343a22ea8097fa4b1e87a1b0a13be864d5bee0c7a8341c09b8002

10 months agoSmall simplification to the query flattener logic.
drh [Sat, 23 Aug 2025 18:18:03 +0000 (18:18 +0000)] 
Small simplification to the query flattener logic.

FossilOrigin-Name: cbfe3f0c84eecef4308e1904cce4fe013ee1986ab6c85e82f92736fc80c0a358

10 months agoFix the cases in joinI.test on this branch.
dan [Sat, 23 Aug 2025 16:26:36 +0000 (16:26 +0000)] 
Fix the cases in joinI.test on this branch.

FossilOrigin-Name: 23ac2377315af02b73db6ae37bfeeda1453e41efb702a6b707346956c2d41a9d

10 months agoFix cksumvfs test case added by [e3bd1feccaee8ff2] so that it works
drh [Sat, 23 Aug 2025 11:09:53 +0000 (11:09 +0000)] 
Fix cksumvfs test case added by [e3bd1feccaee8ff2] so that it works
with varying page sizes.  Test case change only - no changes to code.

FossilOrigin-Name: b6f8f086dacd11f57bdb0eef79f25bce209816a0748f16009372c62dc3edd5ae

10 months agoFix the sqlite3SetJoinExpr() routine so that it correctly sets the
drh [Fri, 22 Aug 2025 21:46:22 +0000 (21:46 +0000)] 
Fix the sqlite3SetJoinExpr() routine so that it correctly sets the
join flags on CASE expressions.

FossilOrigin-Name: a4107c947c03ed48de3ab3f516cec8a3c092cec8ee19145fb564152e5cd16c85

10 months agoSteal the test/joinI.test from the on-clause-error-fix branch that
drh [Fri, 22 Aug 2025 19:30:26 +0000 (19:30 +0000)] 
Steal the test/joinI.test from the on-clause-error-fix branch that
demonstrates that this branch does not work.

FossilOrigin-Name: d163535ec8d463d74112d38a606fa4d900e66deb1a414c947973cd1880e41526

10 months agoRemember if a SELECT statement contains an ON clause. If it does, then after
drh [Fri, 22 Aug 2025 19:17:44 +0000 (19:17 +0000)] 
Remember if a SELECT statement contains an ON clause.  If it does, then after
name resolution, scan the WHERE clause to verify that the ON clause does not
reference tables to its right.

FossilOrigin-Name: 0ec8a8f64434f8cc04f02a356ecaa409ebd886566ba09c32f0fff8ebd103a609

10 months agoEnhance treeview so that it shows the contents of ON clauses while
drh [Fri, 22 Aug 2025 18:19:26 +0000 (18:19 +0000)] 
Enhance treeview so that it shows the contents of ON clauses while
they are still attached to the SrcItem object and before they are
moved into the WHERE clause.

FossilOrigin-Name: 3e285bc117bcbfafe083709d27cca776d6ba418a9f0f58a6d4178035fba2d6ca

10 months agoExperimental minor simplification of the query flattener. simplify-flattener
drh [Fri, 22 Aug 2025 16:34:55 +0000 (16:34 +0000)] 
Experimental minor simplification of the query flattener.

FossilOrigin-Name: 953ea637d51192a6fb9c2ae84e097ae14e8a9c7fa7c98db90a39819b5f97f60e

10 months agoFix a minor typo in a comment.
drh [Thu, 21 Aug 2025 18:47:01 +0000 (18:47 +0000)] 
Fix a minor typo in a comment.

FossilOrigin-Name: 9ada44eb6d26532e45cdd2ed8d5707f1734d0177a13b493ff9cf070e0a992522

10 months agoAdd config as an alias for the reconfigure makefile target. Minor makefile doc tweaks...
stephan [Thu, 21 Aug 2025 17:59:28 +0000 (17:59 +0000)] 
Add config as an alias for the reconfigure makefile target. Minor makefile doc tweaks. Random typo fixes in shell.c.in and tclsqlite.h pointed out by the misspell makefile target. No code changes.

FossilOrigin-Name: 9f15182776b30676c9aae9bcb5d4ad7580359fbdd607c2a9227c9cf2c81a4054

10 months agoRemove some resolved TODOs from the makefile. Ensure that testfixture links against...
stephan [Thu, 21 Aug 2025 17:39:44 +0000 (17:39 +0000)] 
Remove some resolved TODOs from the makefile. Ensure that testfixture links against TCL_LIBS.

FossilOrigin-Name: b7751d144330593b5d41cb50e44b5134baad722be65173a7f55887f5e86a8c9d

10 months agoThe sqlite3_prepare() and similar interfaces should not return
drh [Wed, 20 Aug 2025 23:29:59 +0000 (23:29 +0000)] 
The sqlite3_prepare() and similar interfaces should not return
SQLITE_ERROR_RETRY.
[forum:/forumpost/aa61ab56adb56159|Forum post aa61ab56].

FossilOrigin-Name: 4e473cf0c21dd78d457f5728086372464e82de95c5431a2587efd580f5076291

10 months agoAdd an assert() to prove that sqlite3_prepare() does not return create-index-error-retry-fix
drh [Wed, 20 Aug 2025 23:13:49 +0000 (23:13 +0000)] 
Add an assert() to prove that sqlite3_prepare() does not return
SQLITE_ERROR_RETRY.

FossilOrigin-Name: 6c6a8a596f5d578cc7d35c577608492c0314cdb84ed67b9f068d90fb0b42f4de

10 months agoChange a newly unreachable branch into an ALWAYS().
drh [Wed, 20 Aug 2025 21:12:40 +0000 (21:12 +0000)] 
Change a newly unreachable branch into an ALWAYS().

FossilOrigin-Name: 99556be3fd99e6b7c520b0ae2090f59c6f58375750f9d571f9f586bce0a21504

10 months agoAvoid returning SQLITE_ERROR_RETRY if collation sequences associated with the table...
dan [Wed, 20 Aug 2025 15:42:23 +0000 (15:42 +0000)] 
Avoid returning SQLITE_ERROR_RETRY if collation sequences associated with the table's PK cannot be found when creating an index. Possible fix for [forum:aa61ab56ad | forum post aa61ab56ad].

FossilOrigin-Name: ac649e5b9ca9b8f7729defa8d646df8c0cb57977a5eedcfa2cf1147d109a17f1

10 months agoFix a problem with SQLITE_CHANGESET_CONFLICT conflicts caused by DELETE triggers...
dan [Wed, 20 Aug 2025 11:21:35 +0000 (11:21 +0000)] 
Fix a problem with SQLITE_CHANGESET_CONFLICT conflicts caused by DELETE triggers within a call to sqlite3changset_apply_v2() with SQLITE_CHANGESETAPPLY_IGNORENOOP specified.

FossilOrigin-Name: 138e2aab43ac07aaf8c5389105ff6d3e107ff2d35badcb48233664fcb9661471

10 months agoIn builds without HAVE_FCHMOD (e.g. WASI), make the chmod() of temp files a no-op...
stephan [Wed, 20 Aug 2025 09:43:15 +0000 (09:43 +0000)] 
In builds without HAVE_FCHMOD (e.g. WASI), make the chmod() of temp files a no-op, analog to how lack of HAVE_FCHOWN is handled, as discussed in [forum:98d5158d3fdd7a41 | forum post 98d5158d3f].

FossilOrigin-Name: 7d13e8e403ba00d37b950caa359d74452319247495284d252efa6473bad15b64

10 months agoFix a problem causing an SQLITE_CHANGESET_DATA conflict of a DELETE operation to...
dan [Tue, 19 Aug 2025 21:35:23 +0000 (21:35 +0000)] 
Fix a problem causing an SQLITE_CHANGESET_DATA conflict of a DELETE operation to be incorrectly ignored if the SQLITE_CHANGESETAPPLY_IGNORENOOP is specified.

FossilOrigin-Name: 78b543f85ac6643f3b69bf1250c6362f00e030f93f460ef7d04902682ef64ee9

10 months agoAdd a doc sentence about sqlite3_set_clientdata()'s result value, per request in...
stephan [Sat, 16 Aug 2025 10:17:04 +0000 (10:17 +0000)] 
Add a doc sentence about sqlite3_set_clientdata()'s result value, per request in [forum:bda6c22b6a | forum post bda6c22b6a]. No code changes.

FossilOrigin-Name: c664cee321fc449283ecfc073c45057c078299be33dc0c170b156d81a6698b55

10 months agoAvoid depending on HAVE_STDINT_H and SQLITE_PTRSIZE and other things in non-amalgamat...
dan [Thu, 14 Aug 2025 19:36:59 +0000 (19:36 +0000)] 
Avoid depending on HAVE_STDINT_H and SQLITE_PTRSIZE and other things in non-amalgamation builds of fts5.

FossilOrigin-Name: 309fdd496673bf58984fb16aef3d4cc2ad8c9f6dad7687509f4d708fed5ba41b

10 months agoMinor internal cleanups in the configure script. No behavioral changes.
stephan [Wed, 13 Aug 2025 19:59:37 +0000 (19:59 +0000)] 
Minor internal cleanups in the configure script. No behavioral changes.

FossilOrigin-Name: c42269e5ce3688fccee16cf35e1101f36afc3ccc19bef57b177d46c84db2435a

10 months agoHave cksumvfs write checksums to the database file only, not the wal file. Writing...
dan [Wed, 13 Aug 2025 19:13:16 +0000 (19:13 +0000)] 
Have cksumvfs write checksums to the database file only, not the wal file. Writing them to the wal file breaks wal file recovery.

FossilOrigin-Name: e3bd1feccaee8ff2f68b7b863769dd739e8a434fd32fed73deeeec885628311c

10 months agoIn cksumvfs, do not write checksums to the wal file, as this prevents recovery from... cksumvfs-wal-fix
dan [Wed, 13 Aug 2025 18:37:41 +0000 (18:37 +0000)] 
In cksumvfs, do not write checksums to the wal file, as this prevents recovery from working.

FossilOrigin-Name: 5bf48c7e31904f1f7048499c630801846df89f262b32ea1e49fb6e039eaad11a

10 months agoMinor autosetup/README.md tweaks.
stephan [Wed, 13 Aug 2025 18:30:42 +0000 (18:30 +0000)] 
Minor autosetup/README.md tweaks.

FossilOrigin-Name: bd7530bf6afdad391b223651632e1b4d59ab5ec806c7a94daadc7f09091321f4

10 months agoMove the forced NDEBUG in fts3Int.h up above the #include of assert.h, as reported...
stephan [Wed, 13 Aug 2025 17:58:47 +0000 (17:58 +0000)] 
Move the forced NDEBUG in fts3Int.h up above the #include of assert.h, as reported in [forum:8f16dd9480aad85f | forum post 8f16dd9480aad85f].

FossilOrigin-Name: 3b06d1c9b6c03f38029a8b98fef6253647878c0f8b05447ec0c8122f189c90dc

10 months agoDoc updates in the configure script. No functional changes.
stephan [Wed, 13 Aug 2025 16:49:55 +0000 (16:49 +0000)] 
Doc updates in the configure script. No functional changes.

FossilOrigin-Name: 47c4a2ddd1966aa8564e105fc1f2ba3c9c1668b44d4979424f65148d7976064c

10 months agoFix a problem with the checksum-vfs and direct-overflow-reads. Forum post [forum...
dan [Wed, 13 Aug 2025 14:40:24 +0000 (14:40 +0000)] 
Fix a problem with the checksum-vfs and direct-overflow-reads. Forum post [forum:350e147cd1 | 350e147cd1].

FossilOrigin-Name: 7b7ce5f17fd63932a050b917b4356c23eec6040d1c4f51136393d7c6e3d40a63

10 months agoFix a problem with the checksum-vfs and direct-overflow-reads. cksum-direct-ovfl-fix
dan [Wed, 13 Aug 2025 14:35:14 +0000 (14:35 +0000)] 
Fix a problem with the checksum-vfs and direct-overflow-reads.

FossilOrigin-Name: 8288edb9f930206f117823cf1d18af632dc6adbd7c4c3b9bcfc252e1a5e5b9cd

10 months agoDoc cleanups in main.mk. No functional changes.
stephan [Wed, 13 Aug 2025 11:46:05 +0000 (11:46 +0000)] 
Doc cleanups in main.mk. No functional changes.

FossilOrigin-Name: 839c998443880161af06b9f7470ebfc828251c3c1accdae5f0fbbcc13408474c

10 months agoFix a problem with reading wal mode databases from UNC shares on windows introduced...
dan [Tue, 12 Aug 2025 19:02:48 +0000 (19:02 +0000)] 
Fix a problem with reading wal mode databases from UNC shares on windows introduced by [e88212b10a7829ff].

FossilOrigin-Name: f341e7812984b41acd7dd2dd795a1716a8826af4326578dcdf7d7fdd55124ceb

10 months agoFix a problem building testfixture on non SQLITE_OS_WIN platforms. win-unc-fix
dan [Tue, 12 Aug 2025 18:57:02 +0000 (18:57 +0000)] 
Fix a problem building testfixture on non SQLITE_OS_WIN platforms.

FossilOrigin-Name: 9e6fa73467892eb2333c0a94ca38b66b7cc0432326de93ff131ecde4c165114e

10 months agoOn windows, when opening a UNC path, fall back to using a single file handle shared...
dan [Tue, 12 Aug 2025 17:55:34 +0000 (17:55 +0000)] 
On windows, when opening a UNC path, fall back to using a single file handle shared between all connections for locking.

FossilOrigin-Name: 5c0202d96c3a20a2cbcd38eba5e62371606894a0cbc2da4f60e10a1b5fa7bd04

10 months agoThe off-by-one fix at [3e627d66ebdef8df] is insufficient. An index
drh [Mon, 11 Aug 2025 13:17:10 +0000 (13:17 +0000)] 
The off-by-one fix at [3e627d66ebdef8df] is insufficient.  An index
can hold twice as many columns as a table, if the table is a WITHOUT ROWID
table.  The limit should be twice the maximum, not just one more than the
maximum.  Problem discovered by OSSFuzz.

FossilOrigin-Name: a836126bbec5c14432ed7fc7e9e6f8ebcd5dd1116d3ac8a9a0d25c8f62cc51fe

10 months agoReplace some 32-bit arithmetic in fts3_write.c with 64-bit to avoid the possibility...
dan [Mon, 11 Aug 2025 10:54:39 +0000 (10:54 +0000)] 
Replace some 32-bit arithmetic in fts3_write.c with 64-bit to avoid the possibility of integer overflow.

FossilOrigin-Name: 6711110b1c7589311f012deee4d4dd5b771fa44ad328b471c9ef583960795199

10 months agoAdd an explicit call to sqlite3_initialize() to sqlite3_rsync so that it works when...
stephan [Thu, 7 Aug 2025 20:20:22 +0000 (20:20 +0000)] 
Add an explicit call to sqlite3_initialize() to sqlite3_rsync so that it works when built with SQLITE_OMIT_AUTOINIT, as suggested in [forum:c4ec6b33097b8536 | forum post c4ec6b33097b8536].

FossilOrigin-Name: 8c9db6237154d1c153916ed821f576f91b353bf988182127d2a619506707d6bd

11 months agoSkip checking for dlopen() on mingw builds and those which include "windows" in their...
stephan [Wed, 6 Aug 2025 19:16:16 +0000 (19:16 +0000)] 
Skip checking for dlopen() on mingw builds and those which include "windows" in their host tuple, as suggested in [forum:2436c8ffed | forum post 2436c8ffed]. Those environments identify as Windows for SQLite's purposes so use LoadLibrary().

FossilOrigin-Name: 69b87d4fa8089ef6101e976131dfd5c47dbc3d8c01a7e7d90a444b7a4794f78b

11 months agoDo not allow the number of terms in an ORDER BY or GROUP BY clause to
drh [Wed, 6 Aug 2025 19:12:10 +0000 (19:12 +0000)] 
Do not allow the number of terms in an ORDER BY or GROUP BY clause to
exceed the maximum number of columns in a table.

FossilOrigin-Name: 139e587c7b349e771d67a8b4ee02ab3ad5d5712d4ff4713dad63cb765bdee248

11 months agoFix Windows makefile breakage caused by [ae9d7c9c922bb241].
drh [Wed, 6 Aug 2025 19:05:39 +0000 (19:05 +0000)] 
Fix Windows makefile breakage caused by [ae9d7c9c922bb241].

FossilOrigin-Name: c41324139d6a75b0d37aeec2b0572c63207dd0b06e6a99e4fb221be564e73024

11 months agoAdd *.obj to the make clean target for the sake of the Unix-on-Windows environments.
stephan [Wed, 6 Aug 2025 16:51:12 +0000 (16:51 +0000)] 
Add *.obj to the make clean target for the sake of the Unix-on-Windows environments.

FossilOrigin-Name: da07e0c02fe7de7b67f2564c29f49f251ae2374c0e269d246bd13e68a9a73328

11 months agoExtend the sqlite3_rsync PATH to include /opt/local/bin, per request in [forum:ca3c1b...
stephan [Wed, 6 Aug 2025 15:57:44 +0000 (15:57 +0000)] 
Extend the sqlite3_rsync PATH to include /opt/local/bin, per request in [forum:ca3c1bb7ca8e03 | forum post ca3c1bb7ca8e03].

FossilOrigin-Name: 79a14a5ebd0e8a0aa7f7bb180fcaa348a3ecd046662e3ee05a34f2c9a7db3dd6

11 months agoMinor bug fixes in the script added by the previous check-in
drh [Wed, 6 Aug 2025 12:47:58 +0000 (12:47 +0000)] 
Minor bug fixes in the script added by the previous check-in

FossilOrigin-Name: 2e1a2db3f92b0bd484d979b422fe28e86732121594d190b76dbf46f5d7533643

11 months agoAdd a script to build ARM64EC binaries on Windows11 for ARM64.
drh [Wed, 6 Aug 2025 12:43:06 +0000 (12:43 +0000)] 
Add a script to build ARM64EC binaries on Windows11 for ARM64.

FossilOrigin-Name: 2d5b74b84a9c778183a11070623e89b553ba9cde905b779dbf115ea95aa0ca9b

11 months agoFix a possible printf() of a NULL string in fuzzcheck. (Passing a NULL to
drh [Tue, 5 Aug 2025 23:01:31 +0000 (23:01 +0000)] 
Fix a possible printf() of a NULL string in fuzzcheck.  (Passing a NULL to
"%s" in SQLite's internal printf() prints the text
"NULL", but it apparently segfaults glibc.  Whatever.)
[forum:/forumpost/e07d56579b|Forum post e07d56579b].

FossilOrigin-Name: 4ec69baf4f2a75585b92388cbc352836116381dce3f2d44a3b0f7d3360a17cf0

11 months agoRemove the <i>experimental</i> lsm1 extension from trunk, in as much as
drh [Tue, 5 Aug 2025 12:01:43 +0000 (12:01 +0000)] 
Remove the <i>experimental</i> lsm1 extension from trunk, in as much as
readers were thinking that this was a supported extension and were reporting
bugs against it.

FossilOrigin-Name: ae9d7c9c922bb241363aa690b42b9664c4ad6e76ed5ce474daf1ab44461bc6a3

11 months agoAdd bounds checking and error messages and improved comments
drh [Tue, 5 Aug 2025 10:54:56 +0000 (10:54 +0000)] 
Add bounds checking and error messages and improved comments
to the (unused) zorder extension function.
[forum:/forumpost/e3f1ede174|Forum post e3f1ede174]

FossilOrigin-Name: 6bb717acf706e6ffd4671660ca78237e6a42863f344518e6d21065bf735f971e

11 months agoImproved defenses against corrupt ZIP archives in the zipfile extension.
drh [Tue, 5 Aug 2025 01:53:03 +0000 (01:53 +0000)] 
Improved defenses against corrupt ZIP archives in the zipfile extension.

FossilOrigin-Name: 642e89191deaf75db236102248c662aeef65bcd3dcbdfea694256583556be75f

11 months agoBack out a recently added NEVER().
drh [Tue, 5 Aug 2025 00:16:40 +0000 (00:16 +0000)] 
Back out a recently added NEVER().

FossilOrigin-Name: 4fcdd5bdb061d550b4a35594eb16c9a1699c76caf1d906f1781b4f9cb29ac80c

11 months agoFix a bug in the fuzzcheck.c test program introduced by [1cccea0508f5c8b8].
drh [Mon, 4 Aug 2025 23:37:48 +0000 (23:37 +0000)] 
Fix a bug in the fuzzcheck.c test program introduced by [1cccea0508f5c8b8].

FossilOrigin-Name: 90b217e11c988785d19b8efbba435250c120837492f430cf16d6d4524dd55136

11 months agoWhen doing an indexed row-value comparison using an IN operator where the
drh [Mon, 4 Aug 2025 23:05:35 +0000 (23:05 +0000)] 
When doing an indexed row-value comparison using an IN operator where the
order of the columns in the row-value need to be rearranged in order to match
the index, be sure to make affinity conversions before the rearranging of
columns so that the correct affinity is applied.  Fix for the bug
reported by [forum:/forumpost/eab63506cf|forum post eab63506cf].  This
problem goes back almost nine years to [ddb5f0558c445699].

FossilOrigin-Name: 8800c13deca3717c8a9bed42ef5f09752e4ca8a31adfb4ab0545e0e2b5684bd0

11 months agoAdd an assert() to verify that IN_INDEX_NOOP is not used for vector operations.
dan [Mon, 4 Aug 2025 20:48:37 +0000 (20:48 +0000)] 
Add an assert() to verify that IN_INDEX_NOOP is not used for vector operations.

FossilOrigin-Name: 49c587c6d204841a3d26f183812913ebd585006259040fdf7ba68346cc75580a

11 months agoRemove the "experimental" mark the snapshot interfaces.
drh [Mon, 4 Aug 2025 19:35:20 +0000 (19:35 +0000)] 
Remove the "experimental" mark the snapshot interfaces.

FossilOrigin-Name: 015dc43f628a6f5054152b05b20eb03b6a1153231f824c910a4416792af05272

11 months agoFix harmless compiler warnings arising from [1cccea0508f5c8b8].
drh [Mon, 4 Aug 2025 11:50:41 +0000 (11:50 +0000)] 
Fix harmless compiler warnings arising from [1cccea0508f5c8b8].

FossilOrigin-Name: d682557464a6069a93f890bb0aa983cea020ccde8261335ceeab19b9b6423863

11 months agoMinor doc typo fix in sqliteLimit.h.
stephan [Mon, 4 Aug 2025 11:20:31 +0000 (11:20 +0000)] 
Minor doc typo fix in sqliteLimit.h.

FossilOrigin-Name: 8bb315ef7429a60899f5afe878a3b1aa146b18eef2ac9f4d6eca98587a2255cd

11 months agoAdd a note to sqlite3_deserialize() that a schema name of NULL implies the main db...
stephan [Sun, 3 Aug 2025 08:56:16 +0000 (08:56 +0000)] 
Add a note to sqlite3_deserialize() that a schema name of NULL implies the main db, a former shortcoming pointed out in [forum:0543d8aa8e|forum post 0543d8aa8e].

FossilOrigin-Name: 50234bc9e9fe58daf820ed5a1355f1d173728b5d33a7534244f1acff974baa30