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.
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.
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 [Thu, 20 Nov 2025 12:12:55 +0000 (12:12 +0000)]
Enable the SQLITE_EXPERIMENTAL_PRAGMA_20251114 in the WASM builds for the sake of VFS experimentors. The links in the comments describe what that does.
drh [Tue, 18 Nov 2025 17:49:48 +0000 (17:49 +0000)]
New subcomponent, the Query Result Formatter (QRF), that formats query
results for display to humans on a fixed-width font terminal. Rework the
CLI to make use of the QRF. Renovate the .mode command of the CLI. Also
incorporate the QRF into the TCL interface as the "format" method.
drh [Tue, 18 Nov 2025 17:27:46 +0000 (17:27 +0000)]
Add support for SQLITE_LIMIT_PARSER_DEPTH to limit the size of the stack
used by the parser. This can help prevent deeply nested parse trees that
then cause problems on machines with smaller CPU stacks. Modify the
%realloc and %free directives of Lemon and add the new %stack_size_limit
directive in support of this capability.
drh [Tue, 18 Nov 2025 15:40:02 +0000 (15:40 +0000)]
Modify the "%realloc" and "%free" commands in Lemon so that the functions
they specify take an extra parameter at the end, the %extra_context pointer.
This allows the implementation to distinguish between OOM errors and
failures to increase the stack size because of the stack size limit.
stephan [Mon, 17 Nov 2025 23:55:41 +0000 (23:55 +0000)]
Add api.oo1=0 flag to ext/wasm/GNUmakefile to strip out the sqlite3.oo1 pieces from the build. Part of the ongoing response to [forum:4b7d45433731d2e0|forum post 4b7d45433731d2e0].
drh [Mon, 17 Nov 2025 19:46:04 +0000 (19:46 +0000)]
If SQL is entered as additional command-line arguments to CLI, that counts
the same as getting input from a pipe or file for the purpose of determining
the default format mode.
drh [Mon, 17 Nov 2025 16:44:13 +0000 (16:44 +0000)]
CLI comes up in legacy "list" mode if neither stdin or stdout are a tty, or
if "--compat 20251114" or earlier is specified, or if "--batch" is used.
New modes "batch" and "tty" select either legacy "list" mode or the newer
"qbox" mode with limits.
Make CVS output compatible with legacy. Break out ".import" into a separate
subroutine in anticipation of forthcoming improvements. General code
cleanup.
drh [Sun, 16 Nov 2025 17:27:21 +0000 (17:27 +0000)]
Default .mode is now qbox with limits. New --compat YYYYMMDD command-line
option, and new -DCOMPATIBILITY_DATE=YYYYMMDD compile-time options can
override. Command ".mode YYYYMMDD" sets the mode to the default for the
date given.
stephan [Sat, 15 Nov 2025 15:30:45 +0000 (15:30 +0000)]
JNI: when validing the eTextRep argument in sqlite3_create_function(), only validate the lower four bits (the high bits are for other flags). Add flags to test functions to ensure this case is triggered.
stephan [Sat, 15 Nov 2025 15:09:04 +0000 (15:09 +0000)]
Replace the JNI binding's internal use of sqlite3ErrorWithMsg() with sqlite3_set_errmsg() and have it handle OOM in a way consistent with the rest of the JNI bindings.
stephan [Sat, 15 Nov 2025 13:30:13 +0000 (13:30 +0000)]
Random JS build cleanups and parallel build mkdir race fixes. Reinstate the recently-removed [a65bd978cbc646ec] after finding a reformulation which works on Emscripten 4.0.19 (and saves about 85kb on the JS deliverables).
stephan [Sat, 15 Nov 2025 11:53:30 +0000 (11:53 +0000)]
Reorder initialization of sqlite3ApiBootstrap()'s bownstrapped config object so that it's possible to inject the wasm memory and exports via that, to simplify plugging-in of sqlite3-api.js in other builds. Previously the build-provided wasm exports/memory overrode any which a client might want to use.
stephan [Sat, 15 Nov 2025 09:19:03 +0000 (09:19 +0000)]
Move sqlite3-api-cleanup.js into post-js-footer.js to remove the final direct Emscripten dependency from the intermediary build product sqlite3-api.js (the whole library, waiting to be bootstrapped). This is partly in response to [forum:4b7d45433731d2e0|forum post 4b7d45433731d2e0], which demonstrates a potential use case for a standalone sqlite3-api.js. This is a build/doc change, not a functional one.
dan [Fri, 14 Nov 2025 17:27:20 +0000 (17:27 +0000)]
If SQLITE_EXPERIMENTAL_PRAGMA_20251114 is defined at build-time, send an experimental pragma file-control to the VFS if a call to take a SHARED lock is to be immediately followed by one to take a RESERVED.
stephan [Fri, 14 Nov 2025 16:56:51 +0000 (16:56 +0000)]
In sqlite3-api-cleanup.js, if no Emscripten module is detected then simply return, rather than throw. This should enable the generated sqliet3-api.js (normally an intermediary file) to be used as-is, with the caveat that the caller has to bootstrap the library themselves.
stephan [Fri, 14 Nov 2025 14:42:00 +0000 (14:42 +0000)]
Fix a makefile ordering bug which caused certain builds to fail unless others had already been built. Remove the superfluous sqlite3-node.wasm from the final deliverables dir (sqlite3-node.mjs uses sqlite3.wasm instead).