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].
stephan [Sat, 2 Aug 2025 15:04:50 +0000 (15:04 +0000)]
Fiddle: move the About button into the main toolbar. Extend the About text with some info which only shows up (or is only hidden) when terminal mode is available.
stephan [Sat, 2 Aug 2025 14:50:01 +0000 (14:50 +0000)]
Fiddle: make the toolbar visible in terminal mode and hide non-terminal-mode options when in terminal mode. Move the terminal/split-view toggle button into the toolbar. Improve the view-switching handling.
stephan [Sat, 2 Aug 2025 12:06:37 +0000 (12:06 +0000)]
Fiddle: add an about/info/help view and a button to toggle it. Change the color schema to a more conventional black/white. Force imported databases out of WAL mode, which doesn't work in fiddle.
Ensure that stack space allocated for a flexible array has the correct
alignment. Fix to [d4307a0d43f42e96] to for some compilers
(DeveloperStudio) and platforms (Sparc).
stephan [Wed, 30 Jul 2025 16:17:14 +0000 (16:17 +0000)]
JS: ensure that sqlite3WorkerPromiser.v2.defaultConfig initially refers to sqlite3WorkerPromiser.defaultConfig. This fixes a longstanding oversight rather than a known in-the-wild problem.
stephan [Wed, 30 Jul 2025 15:02:32 +0000 (15:02 +0000)]
Adjust the previous check-in to replace the db's WASM address with yet another random number, and increase the range of random numbers, reducing the chance of cross-worker db ID collision to 1 in many billions.
stephan [Wed, 30 Jul 2025 14:50:44 +0000 (14:50 +0000)]
JS: add a random element when assigning db IDs to Worker1 db instances. This addresses [https://github.com/sqlite/sqlite-wasm/issues/113 | the npm project's ticket #113], which demonstrates that two independent workers can end up generating non-globally-unique IDs. That's not a bug, per se, but it makes the IDs useless for client-side mapping of db connection IDs to client-side state, so we add some randomness to them.
Enhance the printf formatter for %#f such that the minus sign is omitted
if the '+' is missing and all digits shown in the rendering are zero.
Thus, for example, '%#.2f' renders -0.004 as "0.00" instead of "-0.00".
Do not apply the [/info/e33da6d5dc964db8|EXISTS-to-JOIN optimization] if
the subquery contains a LIMIT clause.
[forum:/forumpost/2025-07-23T10:59:14z|forum post 2025-07-23T10:59:14z].
Fix a potentially uninitialized field in the WhereLoop object that is used
as part of the skip-ahead-distinct optimization. This fixes various
[forum:/timeline?ymd=20250722&u=yxchen&vfx|recent forum reports from yxchen].
stephan [Sun, 20 Jul 2025 18:05:45 +0000 (18:05 +0000)]
Teach autoconf/tea/configure to be able to run from the canonical source tree so that a snapshot build or appropriate symlinks are not necessary in order to test the extension.
Split the (internal) sqlite3VdbeCheckFk() routine into two variants,
sqlite3VdbeCheckFkImmediate() and sqlite3VdbeCheckFkDeferred(), which
run faster than the combined general-purpose variant.
stephan [Fri, 18 Jul 2025 22:18:41 +0000 (22:18 +0000)]
Add SQLITE_SELFORDER1 to JS's sqlite3.capi namespace. It's only useful when built with an sqlite3.c which itself was created with -DSQLITE_ENABLE_ORDERED_SET_AGGREGATES, which the canonical build does not do but custom builds may.
Ensure that the accumulator for an aggregate always gets initialized,
even when the aggregate is on the right side of a LEFT JOIN and never
gets evaluated. This fixes a problem introduced by [663f5dd32d9db832]
and found by dbsqlfuzz. Test cases in TH3.
stephan [Wed, 16 Jul 2025 14:51:23 +0000 (14:51 +0000)]
In the wasm makefiles, replace X:=Y with X=Y because := has different semantics depending on the make impl and its use is arguably a bad muscle-memory habit worth breaking. These makefiles are very specifically for GNU make, but long-term it would be nice to eliminate that requirement.
stephan [Wed, 16 Jul 2025 13:22:38 +0000 (13:22 +0000)]
wasm: remove some extraneous levels of makefile var and fix the (unsupported) wasmfs speedtest1 build to account for var renaming which happened long before this.
stephan [Wed, 16 Jul 2025 11:56:16 +0000 (11:56 +0000)]
Remove an unnecessary step from the wasm builds and account for a recent Emscripten-internal code-generation change which caused a post-build cleanup step to not actually clean up (harmless, but adds about 26k of useless stuff to the resulting JS).
stephan [Wed, 16 Jul 2025 10:34:14 +0000 (10:34 +0000)]
Internal refactoring of the WASM build makefile rule generator, working towards parallelizing the various build modes (which is not currently possible because most modes share the same sqlite3.wasm output file name).
stephan [Wed, 16 Jul 2025 09:27:55 +0000 (09:27 +0000)]
Teach the sqlite3 CLI shell to look in XDG_STATE_HOME for the CLI history file before falling back to its historical location in the user's home directory.
dan [Tue, 15 Jul 2025 19:00:01 +0000 (19:00 +0000)]
Avoid evaluating special vtab operators (e.g. MATCH) that are part of ON clauses attached to left joins from being evaluated too early. Fix for [forum:/forumpost/428ef7c468 | forum post 428ef7c468].
Enhance the "mktoolzip.tcl" script (used by the "tool-zip" makefile target) so that
it uses "fossil test-filezip" to build the ZIP archive if available, and so that
it also generates windows-dll-*.zip on Windows platforms.
dan [Mon, 14 Jul 2025 15:40:25 +0000 (15:40 +0000)]
In rtree.c, ensure that the pReadAux statement is reset whenever the bAuxValid flag is cleared. Fix for [forum:/forumpost/3e45ed31d8 | forum post 3e45ed31d8].
dan [Mon, 14 Jul 2025 15:34:11 +0000 (15:34 +0000)]
In rtree.c, ensure that the pReadAux statement is reset whenever the bAuxValid flag is cleared. Possible fix for [forum:/forumpost/3e45ed31d8 | forum post 3e45ed31d8].
dan [Mon, 14 Jul 2025 14:51:43 +0000 (14:51 +0000)]
Add new sessions function sqlite3changeset_apply_v3() and its streaming equivalent. This allows changesets to be filtered on a per-change basis, not just per-table.
dan [Sat, 12 Jul 2025 18:14:41 +0000 (18:14 +0000)]
Avoid evaluating special vtab operators (e.g. MATCH) that are part of ON clauses attached to left joins from being evaluated too early. Possible fix for [forum:/forumpost/428ef7c468 | forum post 428ef7c468].
stephan [Fri, 11 Jul 2025 19:52:36 +0000 (19:52 +0000)]
wasm: introduce the sqlite3.oo1.DB.wrapHandle() and Stmt.wrapHandle() APIs, which enable clients to wrap (sqlite3*) resp. (sqlite3_stmt*) pointers in their oo1 API counterparts, optionally with or without taking over ownership of the pointer.
stephan [Fri, 11 Jul 2025 11:06:25 +0000 (11:06 +0000)]
speedtest1: in WASM builds, disable the "app" test set by default because that one set is triggering file-not-found errors for the db file for reasons not yet understood.
stephan [Fri, 11 Jul 2025 10:27:06 +0000 (10:27 +0000)]
Do not export the numerous Emscripten HEAPxy symbols and remove the last remaining JS code which references them. They have long-since been replaced by internal equivalents and a specific feature check on one of them (which is also no longer needed) is triggering an exception from Emscripten. More details are in [https://github.com/emscripten-core/emscripten/issues/24656 | Emscripten ticket #24656], noting that this is not an Emscripten bug but an Emscripten behavior change brought it to light.
Add the estkey column to the jobs table of testrunner.db. The plan is to
use this to collect measurements that will help generate improved ETAs for
a test run.
stephan [Wed, 9 Jul 2025 13:43:53 +0000 (13:43 +0000)]
wasm: DB.wrapHandle() no longer accepts a DB object as its first argument, as there's no apparent use case for proxying one DB object with another. Doc improvements for the new code.
stephan [Wed, 9 Jul 2025 13:13:01 +0000 (13:13 +0000)]
wasm: add a few tests demonstrating that oo1.Stmt.paramaterCount's new impl does not change visible behaviors. Add the c-pp-filtered files to 'make clean'.
Adjustments to test/incrblob4.test so that it works on both Linux and Mac
in spite of error message differences between those platforms. Minor change
to termIsEquivalent() to provide 100% MC/DC.
New optimizations to detect early when queries return no rows due to
tables being empty. This includes the EXISTS-to-JOIN optimization that
tries to transform EXISTS constraints into additional terms of the FROM
clause.
dan [Tue, 8 Jul 2025 14:54:20 +0000 (14:54 +0000)]
If SQLITE_DEBUG is defined, fts5 does extra checks as part of integrity-check. Ensure that errors from these extra checks are only reported if the other, normal, tests all pass. This fixes a test case in fts5corrupt3.test that was failing if SQLITE_DEBUG was defined.
Rework the fix to the problem described by
[forum:/forumpost/b9647a113b465950|forum post b9647a113b] so that it
provides a more complete fix that covers cases that were not resolved by
the original fix, and so that it does not cause performance regressions.
Simplifications to the row-value IN operator logic. Do not let the query
planner accept a WhereLoop for a row-value IN operator that uses the same
index column more than once.
stephan [Mon, 7 Jul 2025 12:11:26 +0000 (12:11 +0000)]
Work around the Emscripten 4.10 regression described in [https://github.com/emscripten-core/emscripten/issues/24656 | Emscripten ticket #24656]. Problem reported off-list by BrickViking.
Back out the fix at [ba7d5bad32ad6aac] because it does not always work and because
it causes a performance regression. Add new test cases for row-value lookups of
indexes that contain redundant columns, three of which are currently failing. This
branch is seeking an improved solution to the redundant index column problem for
row-value lookups.
stephan [Sun, 6 Jul 2025 15:01:44 +0000 (15:01 +0000)]
Experimentally add sqlite3.oo1.DB/Stmt.wrapHandle(), which allow DB/Stmt instances to wrap a (sqlite3*)/(sqlite3_stmt*) optionally with or without taking ownership of it. The intent is to enable mix-and-match use of the C API, the oo1 API, and any other hypothetical API which exposes those pointers. oo1.Stmt.parameterCount is now a property access interceptor like Stmt.columnCount is, but that doesn't change how it's used.
Enhance the EXISTS-to-JOIN optimization so that it works on EXISTS subqueries
that do not have a WHERE clause, and so that it works on nested EXISTS
subqueries.