]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
2 weeks agoAdd the sqlite3_db_status64() interface. db-status64
drh [Wed, 17 Sep 2025 19:19:52 +0000 (19:19 +0000)] 
Add the sqlite3_db_status64() interface.

FossilOrigin-Name: bb5b982dba774e6b8011e6c980d34131c378967fadc59a18fed1cefda596449a

2 weeks agoRemove newly unreachable code in the solver of the query planner.
drh [Wed, 17 Sep 2025 17:09:07 +0000 (17:09 +0000)] 
Remove newly unreachable code in the solver of the query planner.

FossilOrigin-Name: 9abaa0ac2b3049341f36ff683ff6eebb589698bd910624aa24f11398d557b3c2

2 weeks agoIn the date/time functions, a timezone suffix of "+00:00" should work
drh [Wed, 17 Sep 2025 14:55:47 +0000 (14:55 +0000)] 
In the date/time functions, a timezone suffix of "+00:00" should work
the same as "Z".
[forum:/forumpost/2025-09-17T10:12:14z|Forum post 2025-09-17T10:12:14z].

FossilOrigin-Name: 3b7a5babf0843c4b3ce93d26f1447218585ce645ec3acd942ac649204e16675a

2 weeks agoUpdates to where.c to handle vtabs in joins more similarly to regular tables.
dan [Mon, 15 Sep 2025 17:06:35 +0000 (17:06 +0000)] 
Updates to where.c to handle vtabs in joins more similarly to regular tables.

FossilOrigin-Name: 9138223013505d3e0f1f2b40b51d521184aabd50732fdf4f6bed393cfa9475fc

2 weeks agoMerge latest trunk with this branch. vtab-planner-fixes
dan [Mon, 15 Sep 2025 16:09:54 +0000 (16:09 +0000)] 
Merge latest trunk with this branch.

FossilOrigin-Name: 0bb8c42951ed4fcda60f195b9cc84c80d5b8c0ff77c7517243708f43ba09cfdd

2 weeks agoDiverse internal cleanups in the JS/WASM pieces. A potential fix for a hypothetical...
stephan [Mon, 15 Sep 2025 14:11:55 +0000 (14:11 +0000)] 
Diverse internal cleanups in the JS/WASM pieces. A potential fix for a hypothetical db-close-time resource leak of a subset of automated JS-to-WASM function conversions in Safari. That browser exposes WASM-exported functions via nullary wrappers, which causes a handful of them to misbehave (not clean up) at sqlite3_close_v2()-time.

FossilOrigin-Name: fabbc8b6d184d52a513e80fabd900f578424fc8a8055e3d64fac54b9e28ea18a

3 weeks agoExpose sqlite3_set_errmsg() to the JNI bindings.
stephan [Sun, 14 Sep 2025 12:55:57 +0000 (12:55 +0000)] 
Expose sqlite3_set_errmsg() to the JNI bindings.

FossilOrigin-Name: 292866a46948e8d707bd14864fd1b40eec1bd2e22dcd249ec94711b646c8a70b

3 weeks agoExpose the new sqlite3_set_errmsg() to wasm. Refactor JS's sqlite3__wasm_db_error...
stephan [Sun, 14 Sep 2025 12:14:42 +0000 (12:14 +0000)] 
Expose the new sqlite3_set_errmsg() to wasm. Refactor JS's sqlite3__wasm_db_error() to wrap that instead of the WASM-specific routine which previously did that job. This resolves the TODO added in [ead8a3a94e].

FossilOrigin-Name: e447a50f3a3791c264a68000948daa64edb1857d51d256fbd1ff0f2c2b330d5e

3 weeks agoUpdates to where.c to handle vtabs in joins more similarly to regular tables.
dan [Sat, 13 Sep 2025 19:23:12 +0000 (19:23 +0000)] 
Updates to where.c to handle vtabs in joins more similarly to regular tables.

FossilOrigin-Name: 991383262b0d07ebc79fdb6bed448013cea3a0ac13292d5397dce012b1e6a673

3 weeks agoInitialize the sqlite3_set_errmsg entry on the loadable extension thunk.
drh [Sat, 13 Sep 2025 18:28:34 +0000 (18:28 +0000)] 
Initialize the sqlite3_set_errmsg entry on the loadable extension thunk.
Also fix a harmless compiler warning in sqlite_dbpage.

FossilOrigin-Name: 031a43ae2bb06adefb3f66bf7d1cdae0020b25a1eeee7c3a3dd4447014b9d3f7

3 weeks agoAdd --enable-dbstat and --enable-dbpage options to configure. Fix the
drh [Sat, 13 Sep 2025 18:15:26 +0000 (18:15 +0000)] 
Add --enable-dbstat and --enable-dbpage options to configure.  Fix the
".dbtotxt" command in the CLI so that it uses the correct filename of
the database it is rendering as text.

FossilOrigin-Name: e04e6e681891020f78237fa6dc11bc2e2022c569b04ac96cb333bf59f1662cd1

3 weeks agoEnhance the integerValue() routine in the CLI so that when its text input
drh [Sat, 13 Sep 2025 17:53:14 +0000 (17:53 +0000)] 
Enhance the integerValue() routine in the CLI so that when its text input
specifies an out-of-range integer, the routine returns the nearest integer
that is representable as 64-bit twos-complement.

FossilOrigin-Name: 5d50279fcb66b479e76586b729f36d389b28940476ff70d61b0066a5d5d3ad0c

3 weeks agoAdd a TODO regarding replacing the internal sqlite3__wasm_db_error() with the new...
stephan [Fri, 12 Sep 2025 17:36:23 +0000 (17:36 +0000)] 
Add a TODO regarding replacing the internal sqlite3__wasm_db_error() with the new [34eda113c8819d | sqlite3_set_errmsg()], which serves the same role.

FossilOrigin-Name: ead8a3a94e0f349bcdced6a62af0349b0b7b731137c8d33e2ef0e7eecd107c1f

3 weeks agoAdd sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to return any error...
dan [Fri, 12 Sep 2025 17:13:59 +0000 (17:13 +0000)] 
Add sqlite3_set_errmsg(). Use this in sqlite3changeset_apply() to return any error code and error message via the SQLite handle.

FossilOrigin-Name: e34eda113c8819df46c139ccf749b686c8bfdd399f59345c6d6be3736bdf97cb

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

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

FossilOrigin-Name: 5bc6b9352236df3091ee69b947d0c397264156539d13e5968ec3b9a6e55dc800

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

3 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

4 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

5 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

6 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

7 weeks 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

8 weeks 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

8 weeks 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

8 weeks 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

8 weeks 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

8 weeks 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

8 weeks 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

2 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