stephan [Fri, 28 Nov 2025 17:50:29 +0000 (17:50 +0000)]
Fiddle build: if JQTERM is set to the dir name of a built jquery.terminal checkout then copy the pieces fiddle needs to enable that input mode. By default it looks in ~/src/jquery.terminal.
dan [Fri, 28 Nov 2025 11:52:40 +0000 (11:52 +0000)]
Fix a problem in the xFilter() method of the fts5_vocab virtual table causing it to omit some result rows in some cases where a virtual cursor is used more than once by SQLite.
drh [Thu, 27 Nov 2025 12:15:22 +0000 (12:15 +0000)]
Ensure that the CLI always jumps to the code that frees memory allocations
prior to exiting when it encounters errors on the command line - just so
that fuzzers won't call that memory leak, even though it is not.
drh [Wed, 26 Nov 2025 21:56:55 +0000 (21:56 +0000)]
Do not omit the beginning and ending margins when setting bBorder to QRF_Off,
except when the margins need to be squeezed to fit. Those extra margins give
a more pleasing appearance, and also make the output the same as psql.
stephan [Wed, 26 Nov 2025 16:27:11 +0000 (16:27 +0000)]
Remove some dead code. Resolve the remaining kvvfs v1/v2 API compatibility confusion by eliding the v1 API from Workers like we've always done. Add some tests.
stephan [Wed, 26 Nov 2025 16:26:27 +0000 (16:26 +0000)]
Wasm speedtest1: replace some 'self' with 'globalThis' and expose the sqlite3 object to the global scope for inspection via the dev console (for inspecting resulting kvvfs storage objects).
drh [Wed, 26 Nov 2025 16:21:56 +0000 (16:21 +0000)]
Add the bBorder option to the QRF spec. Reflect this in the -border
option on the TCL format method, and the --border option to ".mode"
in the CLI. Also add the "psql" mode to the CLI.
stephan [Wed, 26 Nov 2025 13:55:20 +0000 (13:55 +0000)]
Internal kvvfs docs and cleanups. Wasm speedtest1: remove the hard-coded --size=2 limit for kvvfs and use a transient storage object instead of session storage (which is limited to --size=2). For small job sizes kvvfs is roughly 3x the speed of memdb and that gap grows as the --size increases, with kvvfs _really_ bogging down on the --size=50 jsonb tests.
drh [Wed, 26 Nov 2025 11:19:11 +0000 (11:19 +0000)]
Fix the sha1() extension function so that it returns actual TEXT instead
of a BLOB containing the UTF-8 TEXT.
[forum:/forumpost/d15eefea7c|Forum post d15eefea7c]
drh [Tue, 25 Nov 2025 22:38:07 +0000 (22:38 +0000)]
Add two new makefile targets, "errors" and "status", for checking on testrunner
errors and for running testrunner status -d 2, respectively. Add a simple
make.bat script at the top level that runs nmake for us, and thus make the
command-line to test on Windows identical to Unix.
stephan [Tue, 25 Nov 2025 19:20:15 +0000 (19:20 +0000)]
Guard access to a piece of Emscripten-related scaffolding so that sqlite3-api.js does not hit it when imported into other builds. Reported in [forum:6eacbb9c447a5665|forum post 6eacbb9c447a5665].
stephan [Tue, 25 Nov 2025 19:05:13 +0000 (19:05 +0000)]
Remove the ostensible support for empty kvvfs names, as those names apparently never reach kvvfs.xOpen (the empty name is special). That actually simplifies things with regards to backwards compatibility.
stephan [Tue, 25 Nov 2025 16:41:56 +0000 (16:41 +0000)]
Add the sqlite3.kvvfs namespace for the new kvvfs APIs instead of adding more sqlite3_js_kvvfs_...() methods. Reinstate that clearing kvvfs storage is illegal when db handles are opened, solely for sanity's sake (they can actually recover from that but supporting such use feels ill-advised).
stephan [Tue, 25 Nov 2025 15:59:58 +0000 (15:59 +0000)]
A more compact formulation of [ac8af73c16ab821] which uncovered two remaining direct calls to kvrecordRead(), now replaced with calls through the thunk. Fix a typo which caused the storage object name to not be passed on to event listener.
stephan [Tue, 25 Nov 2025 15:35:53 +0000 (15:35 +0000)]
In wasm builds, #if out the impls for the 3 core kvvfs i/o routines which get overwritten from JS (and thus aren't used) to reduce dependencies on POSIX APIs.
stephan [Mon, 24 Nov 2025 20:43:14 +0000 (20:43 +0000)]
Do not allow the kvvfs transient flag to flag a previously-non-transient storage as transient. i.e. only applies when first opening a db. Rename the transient flag to delete-on-close to avoid confusion with other meanings of transient in that context.
stephan [Mon, 24 Nov 2025 20:14:23 +0000 (20:14 +0000)]
Add kvvfs URI flag transient=1 to cause the storage object to be removed when the last handle to the db is closed. By default it behaves like a filesystem would, retaining the storage objects.
stephan [Mon, 24 Nov 2025 15:17:52 +0000 (15:17 +0000)]
Get kvvfs v2 storage import working by disallowing it when there are opened db/journal handles. Move import/export out of the JsStorageDb class and into sqlite3_js_kvvfs_import/export_storage().
drh [Mon, 24 Nov 2025 11:00:02 +0000 (11:00 +0000)]
Change our local copy of the third-party jimsh0.c program (used only
during the build process) so that it prints an error message and
exits if malloc() fails. This does not fix any actual bugs nor make
the build process any "safer", but it might help prevent bothersome
warnings from pedantic static analyzers.
stephan [Sun, 23 Nov 2025 22:13:42 +0000 (22:13 +0000)]
More work on kvvfs v2. Db imports work, in the sense that the storage is properly replaced, but the native side is not yet able to recover from that (and how to make it able to do so is not clear).
stephan [Sun, 23 Nov 2025 16:35:18 +0000 (16:35 +0000)]
Eliminate the superfluous 'kvvfs-' part of keys for transient storage and cleanup their export a bit. Reminder for later: we could potentially use the dbpage vtab to serialize any db to this JSON-friendly form.
stephan [Sun, 23 Nov 2025 12:14:18 +0000 (12:14 +0000)]
Bump kvvfs's sqlite3_vfs::iVersion to 2 so that its xCurrentTimeInt64() can be used. Add JsStorageDb.exportToObject() to serialize a kvvfs to a JSON-friendly form.
drh [Sun, 23 Nov 2025 00:10:06 +0000 (00:10 +0000)]
Use the new "split" mode to simplify and improve the implementation of
the ".tables" and ".indexes" commands in the CLI. Fix a bug in QRF
that this new implementation found.
stephan [Sat, 22 Nov 2025 19:21:25 +0000 (19:21 +0000)]
This combination of kvvfs callbacks seems to work okay for both persistent and transient storage, but it's unclear why/how, as xAccess() does not appear to be doing anything useful (and misbehaves when told to report that the storage object in question exists). These tests fail in 64-bit builds for as-yet-unknown reasons (other tests continue to pass in 64-bit).
drh [Sat, 22 Nov 2025 16:43:52 +0000 (16:43 +0000)]
Ignore semicolons at the end of dot-commands, if the compatibility date is 20251115 or later.
[forum:/forumpost/72d084ed552|Forum thread 2025-10-09T21:12:32z]
stephan [Sat, 22 Nov 2025 15:49:45 +0000 (15:49 +0000)]
Cherrypick [e0b33b51229a] for the latest wasmutil/jaccwabyt - all tests are happy. Fix a make deps bug which can break parallel builds involving fiddle.
stephan [Fri, 21 Nov 2025 22:13:35 +0000 (22:13 +0000)]
Get initial JS overrides of the kvvfs sqlite3_vfs and sqlite3_io_methods in place. It now tracks a distinct Storage-ish object per sqlite3_file instance.