]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
10 months agoMinor cleanups in the opfs-sahpool pause/unpause API demo. opfs-sahpool-pause
stephan [Fri, 31 Jan 2025 17:47:47 +0000 (17:47 +0000)] 
Minor cleanups in the opfs-sahpool pause/unpause API demo.

FossilOrigin-Name: e205cdc468e02eefdeb8d391d921aa2d4d28a8b7b87036d6d937a9928261a413

10 months agoAdd the conventional license header to sahpool-worker.js and correct the date on...
stephan [Fri, 31 Jan 2025 16:34:52 +0000 (16:34 +0000)] 
Add the conventional license header to sahpool-worker.js and correct the date on the header in sahpool-pausing.js.

FossilOrigin-Name: f7c3026b0d2e33cc4e3b906810d860b155b1ff714bbe4e1eb9ee392122217efa

10 months agoAdd a small test app demonstrating cooperative semi-concurrency of the opfs-sahpool...
stephan [Fri, 31 Jan 2025 16:25:18 +0000 (16:25 +0000)] 
Add a small test app demonstrating cooperative semi-concurrency of the opfs-sahpool VFS using its un/pauseVfs() APIs.

FossilOrigin-Name: 09570c55a23e5af76dd2153a5b28a493f498d7d4a08b0089f3074d0a2c5d3d29

10 months agoCleanups in the opfs-sahpool VFS pause/unpause feature and its tests.
stephan [Fri, 31 Jan 2025 14:25:38 +0000 (14:25 +0000)] 
Cleanups in the opfs-sahpool VFS pause/unpause feature and its tests.

FossilOrigin-Name: 184ba37702f63196deca91d273e798ca895fbb301938e6264bc82815a4e33149

10 months agoMerge trunk into opfs-sahpool-pause branch.
stephan [Fri, 31 Jan 2025 12:39:07 +0000 (12:39 +0000)] 
Merge trunk into opfs-sahpool-pause branch.

FossilOrigin-Name: 775a547eca2b0b3dbb6c03990236128a095cc34d28caec44b9a5072510c75b63

10 months agoMinor wasm-specific doc touchups.
stephan [Fri, 31 Jan 2025 12:30:37 +0000 (12:30 +0000)] 
Minor wasm-specific doc touchups.

FossilOrigin-Name: 56b618da9073db8b8d5dafa177a3c9e4c4d927bf512e14b0e6d23937f91ce4cf

10 months agoCorrect a typo in tool/emcc.sh.in which could cause all of the configure-time work...
stephan [Fri, 31 Jan 2025 11:45:55 +0000 (11:45 +0000)] 
Correct a typo in tool/emcc.sh.in which could cause all of the configure-time work to locate the emcc binary to go unused. Reported in [forum:feb325cdde5b6f37|forum post feb325cdde5b6f37].

FossilOrigin-Name: f66efd5b531210407ee8f30cdf6684a7610479fd8810a609c54469f7424a0644

10 months agoThe reuse-subroutine optimization [c9a3498113074bbc] might have generated
drh [Thu, 30 Jan 2025 21:12:58 +0000 (21:12 +0000)] 
The reuse-subroutine optimization [c9a3498113074bbc] might have generated
byte-code that loops forever.  This check-in fixes the problem.

FossilOrigin-Name: 0cc4ed8c6e53aca1f5e94c132bedbc7f561c04a77f1a30b965ffe7560634bfeb

10 months agoRemove an unused parameter from an internal-use subroutine in the TCL interface.
drh [Thu, 30 Jan 2025 16:07:51 +0000 (16:07 +0000)] 
Remove an unused parameter from an internal-use subroutine in the TCL interface.

FossilOrigin-Name: a700692b39e24f5ca9ea6f879d413e20c2ad2b85f62c867407dafe111f13d931

10 months agoImprovements to the TCL interface for Tcl9 as suggested by Jan Nijtmans.
drh [Thu, 30 Jan 2025 16:00:28 +0000 (16:00 +0000)] 
Improvements to the TCL interface for Tcl9 as suggested by Jan Nijtmans.

FossilOrigin-Name: d76c5db866de2732b68401a4c3e39acddc7a99bed965160c1796477c062b478a

10 months agoUpdates to the compile-for-windows.md document.
drh [Thu, 30 Jan 2025 13:54:32 +0000 (13:54 +0000)] 
Updates to the compile-for-windows.md document.

FossilOrigin-Name: bcd22ed686954657ba820d53dec255d33797924f76e57b931016813581e04e06

10 months agoMinor code de-duplication across the top-level auto.def and autoconf/auto.def.
stephan [Thu, 30 Jan 2025 12:19:30 +0000 (12:19 +0000)] 
Minor code de-duplication across the top-level auto.def and autoconf/auto.def.

FossilOrigin-Name: 3c990d77cb83ab371d92c97e0528f790ab6126c60f48ff77e48bd166d7834cf0

10 months agoDisable a test case that (intentionally) does use-after-free, as it does
drh [Thu, 30 Jan 2025 12:01:24 +0000 (12:01 +0000)] 
Disable a test case that (intentionally) does use-after-free, as it does
occasionally cause problems even for non-sanitizer builds.

FossilOrigin-Name: 23c7d5bea351c04785153ddb30e19c1236db9d11054ab8229893531026b53655

10 months agoFix build regression, introduced in [d2fe6b05f38d9d] (3.48.0), in which SQLITE_OMIT...
stephan [Thu, 30 Jan 2025 11:19:16 +0000 (11:19 +0000)] 
Fix build regression, introduced in [d2fe6b05f38d9d] (3.48.0), in which SQLITE_OMIT and SQLITE_ENABLE flags passed to configure via CFLAGS were not propagated to the OPT_FEATURE_FLAGS list. Reported in [forum:9801e54665afd728|forum post 9801e54665afd728].

FossilOrigin-Name: ec71d9dcd582188d7fb4ab945187de1023eaaecffeeb2903a6fcc49650bd21e9

10 months agoFix bug in sessions handling of FK constraints introduced by [e09a0c02] (released...
dan [Wed, 29 Jan 2025 18:53:19 +0000 (18:53 +0000)] 
Fix bug in sessions handling of FK constraints introduced by [e09a0c02] (released in 3.48.0). Bug was preventing a changeset containing FK violations from being applied even when the xConflict(CHANGESET_FOREIGN_KEY) returned OMIT.

FossilOrigin-Name: d7c07581203a0a88456588e49e51b40a8341b0e7121809f75be0ee882d91650f

10 months agoSimplify how OpfsSAHPoolUtil.unpauseVfs()'s returned promise is handled.
stephan [Wed, 29 Jan 2025 11:28:18 +0000 (11:28 +0000)] 
Simplify how OpfsSAHPoolUtil.unpauseVfs()'s returned promise is handled.

FossilOrigin-Name: d651b8da5a84cd54d71f15bd34e4db685674ef73f26f5cc26b7af5321a2ec05e

10 months agoAdd experimental support to pause/unpause an SAHPool OPFS VFS, as discussed in [forum...
stephan [Wed, 29 Jan 2025 11:08:11 +0000 (11:08 +0000)] 
Add experimental support to pause/unpause an SAHPool OPFS VFS, as discussed in [forum:fe8cdb8431c32455|forum post fe8cdb8431c32455], the intent being enable a page to relinquish, perhaps temporarily, the VFS such that the VFS's storage can be accessed by another page/tab.

FossilOrigin-Name: 1d2683fe9e4be01c3137e750900f54d287e7d96185e66924d24b50f4647e7ef1

10 months agoEnhance the if() and iif() SQL functions so that they support any
drh [Tue, 28 Jan 2025 20:32:48 +0000 (20:32 +0000)] 
Enhance the if() and iif() SQL functions so that they support any
number of arguments greater than or equal to two.
Suggested by [forum:/forumpost/40f7867f75f80|forum post 40f7867f75f80].

FossilOrigin-Name: fb76d184ee5afc41009c4023bb68b3ddd42c9235a79ec9695c26f5bbe9a1aa25

10 months agoFix sessions module handling of tables with generated columns.
dan [Tue, 28 Jan 2025 19:03:37 +0000 (19:03 +0000)] 
Fix sessions module handling of tables with generated columns.

FossilOrigin-Name: 437fb316389bc3c24c5cdb4d01edfc81e2c2e9f2b399fc2a95b05d279361d8ec

10 months agoFix a copy/paste typo in the output of vfstrace for xDlClose().
drh [Tue, 28 Jan 2025 18:03:22 +0000 (18:03 +0000)] 
Fix a copy/paste typo in the output of vfstrace for xDlClose().

FossilOrigin-Name: 1d57b57c85bb8cb9b8a1808b771bb91eeb8150efd14f9064a390e533e715bab7

10 months agoSimplifh the IdList object to remove unnecessary fields. Performance
drh [Tue, 28 Jan 2025 12:50:17 +0000 (12:50 +0000)] 
Simplifh the IdList object to remove unnecessary fields.  Performance
increases by about 0.8%.

FossilOrigin-Name: a4625bb995dd5582d1f3cf0c2e54eb3f01f1cc1405811dda86ebd38b2b858994

10 months agoFix typo in speedtest.md.
drh [Tue, 28 Jan 2025 10:56:22 +0000 (10:56 +0000)] 
Fix typo in speedtest.md.

FossilOrigin-Name: 984a9cc22c7c8492bf4fae482749663899b0e33a25c32e6ae5c5e98fc12bb83e

10 months agoApparently I got the logic of [abfe488ed67e2e35] confused, even backwards.
drh [Tue, 28 Jan 2025 01:10:45 +0000 (01:10 +0000)] 
Apparently I got the logic of [abfe488ed67e2e35] confused, even backwards.
Change it so that the SQLITE_USE_W32_FOR_CONSOLE_IO macro causes Win32 APIs
to be used for console I/O and for stdio to be used otherwise.  This is
reported to be necessary for builds that use a C-language runtime other than
the one provided by Microsoft.  This changes if for Windows only.  It is a
bug fix, though we don't have a test case that will demonstrate a malfunction.

FossilOrigin-Name: 925e97e6f4238f02259a0c95b1fc668ae32a95329242f8eeae236ef207aca112

10 months agoRemove an ALWAYS() in the star-query heuristic that is sometimes false if you
drh [Tue, 28 Jan 2025 00:48:01 +0000 (00:48 +0000)] 
Remove an ALWAYS() in the star-query heuristic that is sometimes false if you
have a corrupt database.  dbsqlfuzz c37ba7728d79859b79c8341b59297e88fba017d3.
Test case in TH3.

FossilOrigin-Name: 6b9a339628eb8bfb6dfbee02000a6ac91cc8a9ae16bd990e62c4142b9f912c36

10 months agoUse hashing to accelerate column matching on INSERT statements. Code is
drh [Mon, 27 Jan 2025 21:18:13 +0000 (21:18 +0000)] 
Use hashing to accelerate column matching on INSERT statements.  Code is
smaller and about 1.8% faster overall according to test/speedtest.tcl.

FossilOrigin-Name: 8be956383e0344fb613ec2e56fce7b518f439ae34bf9ddb424de2bd9b31c9889

10 months agoEnhance ./configure to issue an unambiguious error if the pathname to either
drh [Mon, 27 Jan 2025 17:48:51 +0000 (17:48 +0000)] 
Enhance ./configure to issue an unambiguious error if the pathname to either
the source tree or the build directory contains any space characters.

FossilOrigin-Name: 614ae5c74f3b534f50432c875681d7a1e6135be883508939c9c57822cc1e9361

10 months agoAvoid splitting a hyperlink across lines in the documentation comment for
drh [Mon, 27 Jan 2025 14:12:14 +0000 (14:12 +0000)] 
Avoid splitting a hyperlink across lines in the documentation comment for
sqlite3_serialize().

FossilOrigin-Name: 74b770bd445d98ff883000ab2e31603d729e415e4e4f640646eef30825634f48

10 months agoMake two private routines in FTS "static" so that they are not callable from
drh [Sun, 26 Jan 2025 23:34:49 +0000 (23:34 +0000)] 
Make two private routines in FTS "static" so that they are not callable from
outside of SQLite itself.

FossilOrigin-Name: 9b11bed0448b95319206b413c35f23bb80f3f4c0a4394d40f2e64066400a01ed

10 months agoFurther comment improvements in the star-query heuristic. Add an ALWAYS()
drh [Sun, 26 Jan 2025 20:09:57 +0000 (20:09 +0000)] 
Further comment improvements in the star-query heuristic.  Add an ALWAYS()
on an unreachable branch to achieve MC/DC.

FossilOrigin-Name: 5e18ce68fbc5e73e6694936f3ba71f5b5e3758cf380951805ca6ea6a3f0943aa

10 months agoSmall size and complexity reduction on the star-query heuristic. Improved
drh [Sun, 26 Jan 2025 17:29:33 +0000 (17:29 +0000)] 
Small size and complexity reduction on the star-query heuristic.  Improved
comments for the star-query heuristic.

FossilOrigin-Name: a7ecb2f4b7eee78b88f1b2e026dffed2007ca4ffeb152632624ab2582839b250

10 months agoRevise the strategy used by the star-query heuristic: Instead of decreasing
drh [Sat, 25 Jan 2025 23:04:05 +0000 (23:04 +0000)] 
Revise the strategy used by the star-query heuristic:  Instead of decreasing
the cost of all fact-table WhereLoops, increase the run-cost of WhereLoops that
are SCANs of dimension tables.

FossilOrigin-Name: 1bc09c9e8bd77ac41ecbe510c7e003757fc11d0f586da6cdf3584315aa9d6407

10 months agoImprovments to debug output on the star-query heuristic.
drh [Sat, 25 Jan 2025 14:30:36 +0000 (14:30 +0000)] 
Improvments to debug output on the star-query heuristic.

FossilOrigin-Name: b3ebeb0682a2c837987acf4ed92f06cf91aea235830c5a0f9dd1ce64afe16e84

10 months agoAvoid calling computeMxChoice() after an OOM as some assert()s can fail
drh [Sat, 25 Jan 2025 00:07:14 +0000 (00:07 +0000)] 
Avoid calling computeMxChoice() after an OOM as some assert()s can fail
in that routine if a prior OOM occurred while building the WhereLoop array.

FossilOrigin-Name: 8b9e621dbf599d7e75e07d75d4c400247d693ea76e00eba0919f4e33e3e10bdd

10 months agoRemove an incorrect ALWAYS() added in check-in [7cfbe14d199bb631].
drh [Fri, 24 Jan 2025 20:59:12 +0000 (20:59 +0000)] 
Remove an incorrect ALWAYS() added in check-in [7cfbe14d199bb631].

FossilOrigin-Name: 431a1a29f93dc642779dc21c3a0edad5fcda1d175e9d1e3b216fa02c234fe774

11 months agoClarify handling of a NULL for the 2nd argument to sqlite3_serialize(), as pointed...
stephan [Fri, 24 Jan 2025 18:37:55 +0000 (18:37 +0000)] 
Clarify handling of a NULL for the 2nd argument to sqlite3_serialize(), as pointed out in [forum:3df7168b90|forum post 3df7168b90].

FossilOrigin-Name: 340edbe5540762656b648c18a359ab7039b4a0af15db199fc86317a415e2bafa

11 months agoImprove the star-query heuristic so that it does a better job of identifying
drh [Fri, 24 Jan 2025 16:37:31 +0000 (16:37 +0000)] 
Improve the star-query heuristic so that it does a better job of identifying
actual star queries.  Also includes improved diagnostic output from the
query planner.

FossilOrigin-Name: 7cfbe14d199bb631abd4d009698eeaee9b8450d5061ded612095ee4738ac6a1f

11 months agoThe debugging output for WhereLoop objects now shows cost star-query-heuristic
drh [Fri, 24 Jan 2025 16:27:18 +0000 (16:27 +0000)] 
The debugging output for WhereLoop objects now shows cost
estimate changes due to the star-query heuristic.

FossilOrigin-Name: a280f5f5480e560fc2b80e8947d8062e8b3487d930e71cb60fc9ba90d87977c1

11 months agoMinor tweaks to the star-query detection and processing.
drh [Fri, 24 Jan 2025 15:55:20 +0000 (15:55 +0000)] 
Minor tweaks to the star-query detection and processing.

FossilOrigin-Name: 61f76a45ac7aa454419fd7539a3d8e60f0733fb5a2abd034d795328f3c1b6e9b

11 months agoCorrect a version number in autosetup/README.md.
stephan [Fri, 24 Jan 2025 15:41:33 +0000 (15:41 +0000)] 
Correct a version number in autosetup/README.md.

FossilOrigin-Name: c338caf0fd4adc7baacf20f6d4274b1776b9487a5a976b8d85e490791be82b11

11 months agoWhen looking for star-queries, do not count a table as a dimension table
drh [Fri, 24 Jan 2025 14:51:15 +0000 (14:51 +0000)] 
When looking for star-queries, do not count a table as a dimension table
if that table is separated from the fact table by an OUTER or CROSS join
or if the table is a self-join.

FossilOrigin-Name: 5aebd7df0d577e98b3affd22b84b42dfe84a9f37fa29187505cc245b95460ba4

11 months agoUpdate autosetup/README.md to reflect recent refactoring.
stephan [Fri, 24 Jan 2025 14:13:20 +0000 (14:13 +0000)] 
Update autosetup/README.md to reflect recent refactoring.

FossilOrigin-Name: 601636829b79888deda7d4dc5786f82b4f0b302d84663ee96b4d47fcb429abcf

11 months agoReplace a handful of hard tabs in string literals with \t in mkwasmbuilds.c.
stephan [Fri, 24 Jan 2025 12:54:59 +0000 (12:54 +0000)] 
Replace a handful of hard tabs in string literals with \t in mkwasmbuilds.c.

FossilOrigin-Name: e8e4d497a7b6aae450cb93927c7583fcce3fe971cd3691f9d9cad605de3cfb1f

11 months agoMinor additions to ext/wasm/README.md.
stephan [Fri, 24 Jan 2025 09:21:39 +0000 (09:21 +0000)] 
Minor additions to ext/wasm/README.md.

FossilOrigin-Name: 85747ea1654c74d330614aa174ede4a989b6456eb1fc5eb0fc9f2d1418b6ef99

11 months agoUpdate ext/wasm/README.md to reflect simplifications permitted by the current configu...
stephan [Fri, 24 Jan 2025 09:18:19 +0000 (09:18 +0000)] 
Update ext/wasm/README.md to reflect simplifications permitted by the current configure script behavior.

FossilOrigin-Name: 9abb56c6acb1c84c2df8534ca3ebb2894afd68bc7b8331d4d12611896c576749

11 months agoRemove extraneous are-we-making-clean guards from the generated wasm build rules...
stephan [Fri, 24 Jan 2025 08:58:54 +0000 (08:58 +0000)] 
Remove extraneous are-we-making-clean guards from the generated wasm build rules, as that guard is set at a higher level. Rename a makefile call()able for consistency.

FossilOrigin-Name: 7f9074e2a7ff62bdcf343895e80a51224de62a22afbbf82068ec5fea7eeda0bb

11 months agowasm: de-list demo-worker1-promiser-esm.html from the test pages because (per Chrome...
stephan [Thu, 23 Jan 2025 22:23:31 +0000 (22:23 +0000)] 
wasm: de-list demo-worker1-promiser-esm.html from the test pages because (per Chrome 131) "Module scripts don't support importScripts()", where "don't" means "they used to but no longer do".

FossilOrigin-Name: 4aa025a943a4024094b91f13abfb8945bbbb8334e3ec904dee5315852845bfe1

11 months agoFix a possible infinity loop in debugging-printf logic in the query planner.
drh [Thu, 23 Jan 2025 21:06:59 +0000 (21:06 +0000)] 
Fix a possible infinity loop in debugging-printf logic in the query planner.
No changes to production code.

FossilOrigin-Name: 9a20b94080f5379867530772e081b737ae4cf6b416469dcabb85b8dd819f491f

11 months agoWhen running wasm-opt, ignore any failure because it will fail for unknown flags...
stephan [Thu, 23 Jan 2025 19:44:09 +0000 (19:44 +0000)] 
When running wasm-opt, ignore any failure because it will fail for unknown flags and the set of legal flags will change from version to version.  Document the size-reduction effect (or non-effect) of a dozen-odd wasm-opt flags and retain those which demonstrate a wasm file size reduction in -Oz builds (our production build mode). Total size savings: roughly 13kb.

FossilOrigin-Name: c9dc581e0287e3462ac55f80ca76e7e98d31157022052c892517363c45287a7b

11 months agoRemove some now-dead makefile code, rename a var for consistency, and fix a recipe...
stephan [Thu, 23 Jan 2025 16:11:24 +0000 (16:11 +0000)] 
Remove some now-dead makefile code, rename a var for consistency, and fix a recipe bug introduced in the previous checkin in the bundler-friendly build.

FossilOrigin-Name: 0acd4ef3addb311476f4a670be0c4c4a0f3f88b0420886d4c1c3c3027dd51d73

11 months agoInitial support for post-processing wasm files with wasm-opt (if it's available)...
stephan [Thu, 23 Jan 2025 15:58:01 +0000 (15:58 +0000)] 
Initial support for post-processing wasm files with wasm-opt (if it's available). This currently shaves 12kb off of the release-mode build of sqlite3.wasm but there are many dozens of wasm-opt flags left to try.

FossilOrigin-Name: 5d16e3f28364de2d6b6456a6fc56bf604b9106c3ae15719f2862192ae3020cc1

11 months agoMove small parts of ext/wasm/GNUmakefile into ext/wasm/config.make.in and have the...
stephan [Thu, 23 Jan 2025 14:09:02 +0000 (14:09 +0000)] 
Move small parts of ext/wasm/GNUmakefile into ext/wasm/config.make.in and have the configure script populate that, rather than dynamically determining those values on each 'make' invocation. Add a configure-time check for the optional wasm-opt binary in prep for pending experimentation with using it to reduce the wasm file sizes.

FossilOrigin-Name: 0a426a549577b883e2de7cd0605041cc97b57f53ee6657bc318b0bfde7b62677

11 months agoRemove unnecessary --minify 0 emcc flag from the wasm build, as -g3 implies that...
stephan [Thu, 23 Jan 2025 11:21:29 +0000 (11:21 +0000)] 
Remove unnecessary --minify 0 emcc flag from the wasm build, as -g3 implies that capability along with other anti-minification features we rely on.

FossilOrigin-Name: 10c91f9cd074e8d35af1c7f8251ac18e5dd91fa14df3fe4e1fb44441c4f08c7a

11 months agoDo not strip binaries during 'make install', for consistency with the legacy build...
stephan [Thu, 23 Jan 2025 06:10:54 +0000 (06:10 +0000)] 
Do not strip binaries during 'make install', for consistency with the legacy build and per request from package maintainers.

FossilOrigin-Name: cd3fed5c2082c250c32c4d99eecd49a1ab840583fc343bcfd27fb536715d0ce9

11 months agoReplace the use of the Autools in ./autoconf/ with Autosetup and extend its configure...
stephan [Wed, 22 Jan 2025 21:34:53 +0000 (21:34 +0000)] 
Replace the use of the Autools in ./autoconf/ with Autosetup and extend its configure script to include many of the flags available in the canonical build.

FossilOrigin-Name: 8c60d4c901af716d4d4dfd1dd4aa626c758fac2cb46112b24b0838b7888fc66f

11 months agoAdd the -q/--quiet option to test/speedtest.tcl. Automatically enable
drh [Wed, 22 Jan 2025 17:18:53 +0000 (17:18 +0000)] 
Add the -q/--quiet option to test/speedtest.tcl.  Automatically enable
-DSQLITE_OMIT_LOAD_EXTENSION and -DSQLITE_THREADSAFE=0 so that no extra
libraries are required.

FossilOrigin-Name: c20d21b473d8a45267262c5df1d7b102eccce8e4cfbe1e467ea66c474aea0af5

11 months agoFix date/time computations to deal with the sub-millisecond rounding
drh [Tue, 21 Jan 2025 17:37:58 +0000 (17:37 +0000)] 
Fix date/time computations to deal with the sub-millisecond rounding
problem identified in [forum:/forumpost/766a2c9231|forum post 766a2c9231].

FossilOrigin-Name: afb0a5923a6db4045fab5226198aab970d746d4866294ebba943c6986e97ecde

11 months agoPerformance improvements to the (debug-use only) Mem.pScopyFrom logic, resulting
drh [Tue, 21 Jan 2025 16:30:55 +0000 (16:30 +0000)] 
Performance improvements to the (debug-use only) Mem.pScopyFrom logic, resulting
in about 8x faster performance under -DSQLITE_DEBUG for the query in from
[forum:/forumpost/0025389d0860af82|forum post 0025389d0860af82].  This change
only affects builds that use -DSQLITE_DEBUG.

FossilOrigin-Name: 7fb1ae25d1572dd7709a0f850c148a5f745a524f01ea231e29a1ebc37c173fb9

11 months agoExplain the lack of docs in autoconf/Makefile.in and refer interested readers to... autoconf-to-autosetup
stephan [Tue, 21 Jan 2025 15:45:03 +0000 (15:45 +0000)] 
Explain the lack of docs in autoconf/Makefile.in and refer interested readers to main.mk in canonical tree. Minor cleanups and fixes in tool/mkautoconfamal.sh.

FossilOrigin-Name: e5bbc2428f1000a451c1b4afd287742b9896a1a6c82d9706c6b8e7d6fb3b1e44

11 months agoThe FuncDev.nArg field values -3 and -4 now have special meansing of 1 or more
drh [Tue, 21 Jan 2025 15:12:00 +0000 (15:12 +0000)] 
The FuncDev.nArg field values -3 and -4 now have special meansing of 1 or more
or 2 or more arguments, respectively.  This saves space in the built-in
function table, resulting in slightly faster performance and a reduced binary
size.

FossilOrigin-Name: 753fd747f24c5e9a019eb00b8a4f66e65c6733ba10a7adbd1b55786867c32ca6

11 months agoRemove now-extraneous autoconf/INSTALL and autoconf/configure.ac and update autoconf...
stephan [Tue, 21 Jan 2025 14:40:35 +0000 (14:40 +0000)] 
Remove now-extraneous autoconf/INSTALL and autoconf/configure.ac and update autoconf/README.* to account for the port to autosetup.

FossilOrigin-Name: 646667af8ca2140d823facf4578105c3d9815ea34b2a4cb96103c2fe7d718229

11 months agoHave fts5 better handle OOM errors from sqlite3_blob_close().
dan [Tue, 21 Jan 2025 14:34:59 +0000 (14:34 +0000)] 
Have fts5 better handle OOM errors from sqlite3_blob_close().

FossilOrigin-Name: f418350f3f83147bc5817a885be6e39ff9ff5722742a88d17600729c53c65010

11 months agoUse Tcl_GetString() instead of Tcl_GetCharLength() to test for a zero-length
drh [Tue, 21 Jan 2025 11:10:16 +0000 (11:10 +0000)] 
Use Tcl_GetString() instead of Tcl_GetCharLength() to test for a zero-length
string in the TCL interface, since that is much more efficient.

FossilOrigin-Name: a8d9dcfd23fbfcd887e451382836c1e88215984cc01e00be11387dbf4ab26fd8

11 months agoconfigure script: work around msys's inability to 'exec' a '.sh' file by prefixing...
stephan [Mon, 20 Jan 2025 20:48:18 +0000 (20:48 +0000)] 
configure script: work around msys's inability to 'exec' a '.sh' file by prefixing the call with an explicit 'sh', as reported in [forum:befb352a42a7cd6d|forum post befb352a42a7cd6d].

FossilOrigin-Name: 25b01f1c9a5e606441bfd4e729fb88361436dffc76ef7a10c04a4d4ad0bcc655

11 months agoAdd 'dist' and missing 'install' pieces to the autoconf bundle.
stephan [Mon, 20 Jan 2025 19:57:32 +0000 (19:57 +0000)] 
Add 'dist' and missing 'install' pieces to the autoconf bundle.

FossilOrigin-Name: 16fa20413e3f3f0b6ea5d97022945843d1f785ac0142836f2a3651fd1917385f

11 months agoRemove an assert() in the unix file locking logic that is not true
drh [Mon, 20 Jan 2025 19:19:31 +0000 (19:19 +0000)] 
Remove an assert() in the unix file locking logic that is not true
if alternative VFS "unix-excl" is used for a read-only connection.

FossilOrigin-Name: bd5dc92368e41231a07bb59dd3db8942e238129ec7a3c8d785459d9b62bfcba3

11 months agoFix an assert() that could fail if a virtual table called sqlite3_step() from within...
dan [Mon, 20 Jan 2025 18:26:58 +0000 (18:26 +0000)] 
Fix an assert() that could fail if a virtual table called sqlite3_step() from within the xSync() method while committing a "PRAGMA defer_foreign_keys=1" transaction.

FossilOrigin-Name: 39bdbb3f6dd1d30d180526d35c11f789f5e9d45b99ead72fd4a3b136afab66b1

11 months agoconfigure script: remove an overzealous is-a-file check in the tclsh search which...
stephan [Mon, 20 Jan 2025 16:14:09 +0000 (16:14 +0000)] 
configure script: remove an overzealous is-a-file check in the tclsh search which fails to account for implicit .exe extensions on Windows builds. Reported in [forum:c27403ef974df9f1|forum post c27403ef974df9f1]. (Same change as [89306d1a4905] but to a different file, as that content was moved since the 3.48 release.)

FossilOrigin-Name: 239a3d1573f4cb720308018280b2add54034e69e38fe7060a7238875eee4f1c9

11 months agoGet libsqlite3.so and .a building in the autoconf bundle.
stephan [Sun, 19 Jan 2025 21:47:06 +0000 (21:47 +0000)] 
Get libsqlite3.so and .a building in the autoconf bundle.

FossilOrigin-Name: 88cee3fc7c8bfd9b6955fb6b2fd6b25660563e4d043ffa5ea18d8abe91afdb7f

11 months agoGet the CLI shell building in the autoconf bundle.
stephan [Sun, 19 Jan 2025 19:51:47 +0000 (19:51 +0000)] 
Get the CLI shell building in the autoconf bundle.

FossilOrigin-Name: 241cdbc40a2f82df53c149849a103a335b0643a65e229a1e80ab90a0e457bb6b

11 months agoAdd an SQLITE_TESTCTRL_OPTIMIZATION mask that can disable the query planner
drh [Sun, 19 Jan 2025 19:14:21 +0000 (19:14 +0000)] 
Add an SQLITE_TESTCTRL_OPTIMIZATION mask that can disable the query planner
heuristics that are designed to help with star queries.

FossilOrigin-Name: fec4ff185a2f3f1bee8f27432206276636cf27365d2d41cd7282f8c0425f2e96

11 months agoInitial work towards converting the autoconf bundle to autosetup. Currently non-funct...
stephan [Sun, 19 Jan 2025 18:58:09 +0000 (18:58 +0000)] 
Initial work towards converting the autoconf bundle to autosetup. Currently non-functional.

FossilOrigin-Name: d7708372ff2fef4bfa61e56dbfbb363cac7685587a61a151497991d9a08bb07f

11 months agoFurther refactoring of auto.def to simplify creation of variant builds like the autoc...
stephan [Sun, 19 Jan 2025 18:32:45 +0000 (18:32 +0000)] 
Further refactoring of auto.def to simplify creation of variant builds like the autoconf bundle.

FossilOrigin-Name: f806c563a29240c709508316846fbe0cb3ed61b68a6c1d9544eb699e30141d8d

11 months agoMinor internal refactoring of auto.def to support the pending autoconf subdir port...
stephan [Sun, 19 Jan 2025 16:26:25 +0000 (16:26 +0000)] 
Minor internal refactoring of auto.def to support the pending autoconf subdir port to autosetup. No functional changes.

FossilOrigin-Name: 01ff37584708f3f79c62c1b5ed8cceab721cf8348a69a65f0559b1ef8845e85b

11 months agoMove some of the auto.def functions into autosetup/sqlite-config.tcl for re-use in...
stephan [Sun, 19 Jan 2025 14:53:45 +0000 (14:53 +0000)] 
Move some of the auto.def functions into autosetup/sqlite-config.tcl for re-use in the pending migration of the autoconf bundle to autosetup. This is just reorg, no functional changes.

FossilOrigin-Name: 2f1e94994f3595baad4045ab05ffee0668059c23ab37a39c25b83c62bfbaea28

11 months agoEnable automatic query-time indexes for WITHOUT ROWID tables.
drh [Sat, 18 Jan 2025 23:44:06 +0000 (23:44 +0000)] 
Enable automatic query-time indexes for WITHOUT ROWID tables.

FossilOrigin-Name: 8534af5b94be9f5b1f02453e1c3b6b3f78a698af91595bdbbfdea00676510116

11 months agoAdd a simple test case (many more are coming soon to TH3). Fix an obsolete without-rowid-autoidx
drh [Sat, 18 Jan 2025 21:19:02 +0000 (21:19 +0000)] 
Add a simple test case (many more are coming soon to TH3).  Fix an obsolete
assert().

FossilOrigin-Name: aa829a131a3431791083cf60d9cf00e7b3c0fafdd39a23e761b629a2287ab875

11 months agoAdd support for automatic query-time indexes on WITHOUT ROWID tables.
drh [Sat, 18 Jan 2025 21:00:19 +0000 (21:00 +0000)] 
Add support for automatic query-time indexes on WITHOUT ROWID tables.

FossilOrigin-Name: 89c4cbd9529081941d7283a401c4a8d71b241f4577ebf6d3eb2ebe5a1cf92f2e

11 months agoWhen cross-compiling, change the CFLAGS default to exclude -g, per /chat discussion...
stephan [Sat, 18 Jan 2025 16:05:38 +0000 (16:05 +0000)] 
When cross-compiling, change the CFLAGS default to exclude -g, per /chat discussion prompted by [forum:9a67df63eda9925c|forum post 9a67df63eda9925c].

FossilOrigin-Name: 4309da2ca5cb99ea81f3034ae3c5809187c0131d21f9f9469ea0d69c941f393e

11 months agoWhen running make install, avoid the -s (strip) flag when cross-compiling, as it...
stephan [Sat, 18 Jan 2025 13:51:01 +0000 (13:51 +0000)] 
When running make install, avoid the -s (strip) flag when cross-compiling, as it only works for the build platform. Reported in [forum:9a67df63eda9925c|forum post 9a67df63eda9925c].

FossilOrigin-Name: 230e49c10e3aa6fe9c487a1e026016a8bf97f7e736e7477d5976d987da5e83cf

11 months agoFor the purpose of the query planner heuristic added by [38db9b5c83], a query
drh [Fri, 17 Jan 2025 23:49:40 +0000 (23:49 +0000)] 
For the purpose of the query planner heuristic added by [38db9b5c83], a query
should only count as a star query if the fact tables are connected to the
dimension table by an INNER JOIN.  If a LEFT JOIN is used, then the fact
tables are constrained to be in inner loops anyhow and so the heuristic does
not make any sense.  But it does interfere with AUTOMATIC index creation, which
causes the performance regression reported by
[forum:/forumpost/d87570a145599033|forum post d87570a1455].

FossilOrigin-Name: 0852c57ee2768224af79910e6f26e70a4962651dae0f8b45cbfc847e6707d7bb

11 months agoEnhance a comment on a test case to add recent context.
drh [Fri, 17 Jan 2025 17:09:42 +0000 (17:09 +0000)] 
Enhance a comment on a test case to add recent context.

FossilOrigin-Name: c2647d1bd16fd46dd03953afee6cad44ce14fa2c36713c487b678d63660bc072

11 months agoTypo fix in speedtest.md.
stephan [Fri, 17 Jan 2025 15:56:16 +0000 (15:56 +0000)] 
Typo fix in speedtest.md.

FossilOrigin-Name: 36027cf340fe2e351c63129d069f9bced090c4a028ffd78d5b8c0f418ad9f230

11 months agoImprovements to the speedtest.tcl script. Add documentation on how to use the
drh [Fri, 17 Jan 2025 15:39:48 +0000 (15:39 +0000)] 
Improvements to the speedtest.tcl script.  Add documentation on how to use the
script.

FossilOrigin-Name: eb3853d08141bf941193e8ecaf991191bb7fb46287818708a84018520eb1835e

11 months agoAdd the test/speedtest.tcl script to simplify performance and size testing.
drh [Fri, 17 Jan 2025 12:32:01 +0000 (12:32 +0000)] 
Add the test/speedtest.tcl script to simplify performance and size testing.

FossilOrigin-Name: ad7b38672656d0336a73bb789ec83f6939fbdae81e21be68e0313006826dc294

11 months agoFix a potential one-byte buffer overrun when reading from the Windows
drh [Fri, 17 Jan 2025 10:39:04 +0000 (10:39 +0000)] 
Fix a potential one-byte buffer overrun when reading from the Windows
console in the CLI. [forum:/forumpost/95e17b8f5c|Forum post 95e17b8f5c].

FossilOrigin-Name: 4d96759694c91301410f53a3f737a049c33e8b259b0954ff659714aff8b21ae8

11 months agospeedtest1: further improvements to the "json" testset.
drh [Thu, 16 Jan 2025 20:46:08 +0000 (20:46 +0000)] 
speedtest1: further improvements to the "json" testset.

FossilOrigin-Name: c4750f7cf7e2188623de8b12e01acf3e3d7dc7b5ea87ac449571eb36f97d842a

11 months agospeedtest1: Improvements to the "json" testset. Better balance in "mix1".
drh [Thu, 16 Jan 2025 20:08:59 +0000 (20:08 +0000)] 
speedtest1:  Improvements to the "json" testset.  Better balance in "mix1".

FossilOrigin-Name: 2cc73c5e08f1a16fe8accf0af6af061e42d27635883d09234516fd470e99bc0a

11 months agoRevamp the "json" testset in speedtest1.
drh [Thu, 16 Jan 2025 17:19:06 +0000 (17:19 +0000)] 
Revamp the "json" testset in speedtest1.

FossilOrigin-Name: d33508836bc88314a205bfa9d80f3ebe695163cf0c46d500ad674535975408fb

11 months agoAdd the "json" test case to speedtest1 and include it in "mix1".
drh [Thu, 16 Jan 2025 14:37:48 +0000 (14:37 +0000)] 
Add the "json" test case to speedtest1 and include it in "mix1".

FossilOrigin-Name: 2db3a3ee37a9d2fe9b94d16d35c24846c37abe73b89cde4dd763e01a2bfaa8b7

11 months agoSpeedtest1 enhancements: (1) Add the ability to scale performance of
drh [Thu, 16 Jan 2025 14:06:29 +0000 (14:06 +0000)] 
Speedtest1 enhancements:  (1) Add the ability to scale performance of
tests sets using "/NNN" after the testset name, even for testsets in a
comma-separated list.  (2) Add the "mix1" macro testset.

FossilOrigin-Name: 85667b3a572bc9afd8c862a0b2c5f47f76ca80d6e61302ca7d7c1b326d3dd578

11 months agowasm: after generating the .js/.mjs file, strip out all of the generated pieces which...
stephan [Thu, 16 Jan 2025 13:10:06 +0000 (13:10 +0000)] 
wasm: after generating the .js/.mjs file, strip out all of the generated pieces which create Emscripten call() bindings for the sqlite3 APIs, as we don't use those binding, so both the setup time and the memory they use installing WASM proxy bindings is wasted. This eliminates some 200 superfluous/unused bindings from the init process.

FossilOrigin-Name: 020d2c7528be6f11a5b2b849d7b2f04e47abe2b0842520ff60eb7defb3768e1c

11 months agoWhen generating the autoconf snapshot, replaces the Libs.private line from sqlite3...
stephan [Thu, 16 Jan 2025 12:15:51 +0000 (12:15 +0000)] 
When generating the autoconf snapshot, replaces the Libs.private line from sqlite3.pc.in with one compatible with the legacy build, as reported in [forum:e40b9b424a|forum post e40b9b424a].

FossilOrigin-Name: fe47154799bfefb12eb1209d9ada64ecac38bee1b7c3558d175215a2beba991d

11 months agoReplace use of Emscripten's Module.postRun() with a custom callback so that we get...
stephan [Thu, 16 Jan 2025 09:27:40 +0000 (09:27 +0000)] 
Replace use of Emscripten's Module.postRun() with a custom callback so that we get consistent library init timing with both Emscripten 3.1.x and 4.0.x. Details and discussion are in [https://github.com/emscripten-core/emscripten/issues/23420|Emscripten ticket #23420].

FossilOrigin-Name: 4863a70ac61ff6f868429f16f0141484ea98f973fde1a9aff879252d0f1dbb6b

11 months agoWhen two indexes have the same cost, use the narrower one (the one with the
drh [Thu, 16 Jan 2025 01:47:03 +0000 (01:47 +0000)] 
When two indexes have the same cost, use the narrower one (the one with the
smaller average on-disk row width).

FossilOrigin-Name: 398559678f2b9a65b245ed73b4d512c4fccc69d42b5a6a1c1b7755a80b69d073

11 months agoCheck-in [da9124fee28c155c] broken the new SQLITE_IOCAP_SUBPAGE_READ mechanism
drh [Wed, 15 Jan 2025 21:13:38 +0000 (21:13 +0000)] 
Check-in [da9124fee28c155c] broken the new SQLITE_IOCAP_SUBPAGE_READ mechanism
for inhibiting direct-overflow-read.  This check-in fixes the problem.

FossilOrigin-Name: 113078d555eaf740666680562ebbb04f7d823b72e8b2d553627e54ab3d7bf653

11 months agoTeach tool/stripccomments.c that a backslash immediately preceeding a forward slash...
stephan [Wed, 15 Jan 2025 21:09:19 +0000 (21:09 +0000)] 
Teach tool/stripccomments.c that a backslash immediately preceeding a forward slash means that that forward slash cannot be the start of a comment. This is intended to allow JavaScript regular expressions containing \/* (like [https://github.com/emscripten-core/emscripten/issues/23412|the one introduced in emsdk 4.0.0]) to pass through properly. Re-enable comment-stripping in the JS dist builds.

FossilOrigin-Name: db21d6cc9d1c425deffc0e4e92173caf586e6ac66110c71a4930b21e3e7f84b9

11 months agoWork around [https://github.com/emscripten-core/emscripten/issues/23420|a behavior...
stephan [Wed, 15 Jan 2025 20:53:14 +0000 (20:53 +0000)] 
Work around [https://github.com/emscripten-core/emscripten/issues/23420|a behavior change in emsdk 4.0.0] which breaks the load/init timing of the wasm module.

FossilOrigin-Name: 00a750184bcf1a94bf4e7f1d5029a42671e87e2997ae97be07bd900d3702883d

11 months agoWhen choosing between two indexes with the same cost, pick the one with the consider-idx-width
drh [Wed, 15 Jan 2025 20:23:22 +0000 (20:23 +0000)] 
When choosing between two indexes with the same cost, pick the one with the
smaller predicted number of bytes per row.

FossilOrigin-Name: d4bd0d4214551f88f248698fefc821575b722ce5c194d0b3796f572e4704f641

11 months agoVariable names and conditional logic simplified in where.c. These
drh [Wed, 15 Jan 2025 19:30:10 +0000 (19:30 +0000)] 
Variable names and conditional logic simplified in where.c.  These
changes are cosmetic only and do not affect the resuling machine code.

FossilOrigin-Name: dbc2d6a244fdafd208239894dbdd8f139db6ca20dd8f1ed00d87028e0cb60570

11 months agoFix a typo in a wasm makefile var name, noting that this doesn't actually fix anythin...
stephan [Wed, 15 Jan 2025 15:27:02 +0000 (15:27 +0000)] 
Fix a typo in a wasm makefile var name, noting that this doesn't actually fix anything because the var in question is not used when building 'clean' or 'distclean'.

FossilOrigin-Name: 7cfc75a625095e41c3e952d4a209fdbb344df0d3dd9b0103e9e6a986dfe53c89