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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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].
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.
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.)
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.
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].
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].
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.
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.
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].
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].
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.
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.
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'.
drh [Mon, 13 Jan 2025 11:28:34 +0000 (11:28 +0000)]
GCC 13 has become more quite pedantic about the signature of functions matching the
type of pointers through which the functions are called. Make adjustments to
extension functions and test procedures to work around this. No changes to the
core.
stephan [Sat, 11 Jan 2025 09:02:55 +0000 (09:02 +0000)]
Fix an age-old bug in the lower-level wasm/js helper bits which was (A) caused removal of customized WASM func/argument conversion to siltently fail and (B) triggered a warning in the closure toolchain. Reported in [jaccwabyt ticket c5c296e85a7c01360820|https://fossil.wanderinghorse.net/r/jaccwabyt/info/c5c296e85a7c01360820].
drh [Thu, 9 Jan 2025 19:57:44 +0000 (19:57 +0000)]
Update the makefile so that it puts the amalgamation files in a subdirectory
in the amalgamation-zip.
[forum:/forumpost/b8dd1941e1|Forum post b8dd1941e1].
dan [Thu, 9 Jan 2025 14:10:25 +0000 (14:10 +0000)]
When removing an fts5 in secure-delete mode, defer setting the table version to SECUREDELETE until flushing data to disk. This prevents problems that can occur if there is a rollback or statement rollback operation.
drh [Tue, 7 Jan 2025 14:55:49 +0000 (14:55 +0000)]
Enhancements to the Tcl SQLite extension testing procedures so that they
install a full-featured SQLite and so that Tcl is build statically so that
there is no need to worry with LD_LIBRARY_PATH.
drh [Sun, 5 Jan 2025 17:16:33 +0000 (17:16 +0000)]
Refactor the TCL extension test procedure to deal with TCL8.6 and TCL9.0
separately, to simplify the procedures and reduce cognative stress on the
tester.
drh [Sun, 5 Jan 2025 11:19:32 +0000 (11:19 +0000)]
Improvements to TCL extension test procedure description. Improvements to
the tclextension-list and tclextension-verify makefile targets to suppress
unnecessary output.
drh [Sat, 4 Jan 2025 15:52:40 +0000 (15:52 +0000)]
Add the document describing test procedures for the TCL extension build
process. Update the Windows makefile so that it builds the TCL extensions
successfully with a default installation of Tcl8.6.