dan [Tue, 17 Mar 2026 17:05:45 +0000 (17:05 +0000)]
When integrity-check finds a missing index entry, search a small range (currently 10) of entries around the missing key for an entry that matches all non-virtual and non-expression fields.
dan [Tue, 17 Mar 2026 11:17:54 +0000 (11:17 +0000)]
Change the sqlite3VdbeFindDeleteKey() routine so that all index fields that are not expressions or virtual columns must match the table for the delete to succeed.
dan [Mon, 16 Mar 2026 16:21:43 +0000 (16:21 +0000)]
If OP_IdxDelete cannot find an index entry to delete, first search 10 entries in either direction of where the entry should be in the index. If that fails, search the entire index for an entry with matching PK fields.
drh [Mon, 16 Mar 2026 15:35:41 +0000 (15:35 +0000)]
Rework the ".indexes" command of the CLI. (1) The PATTERN now matches
the name of the index itself, not the name of the table containing
the index, thus making the pattern actually useful. (2) System-generated
indexes (for UNIQUE constraints and similar) are omitted unless
the -a|-all or --sys options are added. (3) The --expr option causes
only expression indexes to be shown.
dan [Mon, 16 Mar 2026 11:14:26 +0000 (11:14 +0000)]
Properly fix temp triggers created as part of FK processing to their schemas. Otherwise they may become confused by similarly named child tables in other attached databases. Fix for forum post [forum:636bd0180a | 636bd0180a].
drh [Tue, 10 Mar 2026 21:01:59 +0000 (21:01 +0000)]
Fix the behavior dot-commands that appear as command line arguments to the
CLI so that their effect persists into subsequent commands on the command
line. This fix also improves error messages caused by command line
arguments.
[forum:/forumpost/2026-03-10T19:26:06z|Forum post 2026-03-10T19:26:06z].
drh [Tue, 10 Mar 2026 18:13:13 +0000 (18:13 +0000)]
Revamp the QRF insert-mode optimization of [659ff6ab55802507]. The
control value is now nMultiInsert. Multiple rows are added to each INSERT
statement until the number of bytes in that statement exceeds the
nMultiInsert value. The CLI uses a default value of 3000, which provides
a good balance between speed and prepare-statement size. The output
from ".dump" now loads nearly 2x faster in some cases.
drh [Tue, 10 Mar 2026 14:02:03 +0000 (14:02 +0000)]
Enhance QRF with the mxTuple field, which if greater than 1 causes the
QRF_STYLE_Insert style to group as many as mxTuple adjacent rows into
a single INSERT statement. The field is accessible using the -mxtuple
option in the TCL interface, and the --mxtuple option in ".mode". The
output of the ".dump" and ".fullschema" commands responds to the current
--mxtuple setting.
drh [Sun, 8 Mar 2026 18:50:35 +0000 (18:50 +0000)]
In the decimal.c extension, set a default MAX_DIGITS to 100 million.
Do not allow integer overflow of the N parameter to the internal
decimal_round() function.
stephan [Sun, 8 Mar 2026 16:03:08 +0000 (16:03 +0000)]
Upgrade ext/wasm/c-pp-lite.c to its newer sibling because we've reached the older one's limits. This renames c-pp-lite.c to libcmpp.c to maintain both the SCM- and code lineage but that may end up looking a bit weird because the diff between the two is vast.
stephan [Sun, 8 Mar 2026 08:32:22 +0000 (08:32 +0000)]
Merge opfs-wl into trunk, not so much for the "opfs-wl" VFS, which is stil tentative (working fine but with little perceived benefit), but for the "opfs" VFS cleanups which necessarily happened around it.
drh [Sat, 7 Mar 2026 22:37:28 +0000 (22:37 +0000)]
Use the UINT64_C() macro rather than the LLU suffix on integer literals
for portability to older Microsoft compilers.
[forum:/forumpost/0a9ffaff6fcdedb3|Forum thread 0a9ffaff6fcdedb3].
stephan [Sat, 7 Mar 2026 06:10:29 +0000 (06:10 +0000)]
Extend the JS pre-bootstrapping configuration to include an option to disable inclusion of any given extension VFS (not the default VFSes, like memdb). The primary motivation for this is to give people who don't use OPFS to a way to keep the OPFS VFSes from loading their proxy workers, which are expensive.
stephan [Sat, 7 Mar 2026 04:19:08 +0000 (04:19 +0000)]
Fix the mangling of the opfs async proxy script's URI caused by both OPFS VFSes modifying it to accound for sqlite3.dir. Add a link to speedtest1 with opfw-wl to index.html.
stephan [Sat, 7 Mar 2026 03:32:17 +0000 (03:32 +0000)]
Cleanups and docs in the opfs vfs and its concurrency tester. Experimentally add sqlite3.capi.sqlite3_js_retry_busy(), which runs a callback repeatedly until it _stops_ returning (or throwing) an SQLITE_BUSY error.
stephan [Sat, 7 Mar 2026 01:01:13 +0000 (01:01 +0000)]
For backwards compatibility, ensure that the "opfs" VFS does not specifically require Atomics.waitAsync() (a new requirement of "opfs-wl"), but make use of it if available. Only apply jitter to the concurrency test runs at random intervals.
stephan [Fri, 6 Mar 2026 23:50:44 +0000 (23:50 +0000)]
Add some jitter and duration info to the opfs concurrency tester. Ensure that Atomics.waitAsync() is available for opfs-wl. Further testing has shown that Web opfs-wl is consistently fairer about doling out contested locks but it's dog slow compared to the original VFS under moderate concurrency. In single-connection use they're effectively on par.
drh [Fri, 6 Mar 2026 21:31:07 +0000 (21:31 +0000)]
Fix a NULL pointer dereference in the (undocumented) two-argument version
of the decimal() extension SQL function.
[forum:/forumpost/fa9c2dc83f|Forum post fa9c2dc83f].
drh [Fri, 6 Mar 2026 18:51:49 +0000 (18:51 +0000)]
Merge fixes that were deferred until after the 3.52.0 release, including:
(1) Fix handling of DISTINCT with OUTER JOIN, (2) Enhance configure to
auto-detect linenoise, (3) Add recent configuration settings to WASM.
stephan [Fri, 6 Mar 2026 16:04:21 +0000 (16:04 +0000)]
This Web Lock impl can reliably run a single OPFS connection but rather unreliably 'loses' workers with higher counts, presumably due to deadlock or deadly embrace (how _all_ of them can deadlock at once is unclear, but clearly a bug).
stephan [Fri, 6 Mar 2026 15:41:17 +0000 (15:41 +0000)]
Expose SQLITE_{DBCONFIG_FP_DIGITS,LIMIT_PARSER_DEPTH,PREPARE_FROM_DDL} to WASM and add support for DBCONFIG_FP_DIGITS to the variadic wrapper for sqlite3_db_config(). These unfortunately went overlooked before the 3.52 release.
drh [Thu, 5 Mar 2026 18:16:25 +0000 (18:16 +0000)]
Enhance ./configure to automatically detect linenoise in ../linenoise
relative to the build directory, or ../linenoise relative to the source
directory, or at $HOME/linenoise.
stephan [Thu, 5 Mar 2026 11:51:27 +0000 (11:51 +0000)]
Strip the opfs-wl "back to formula", removing the current false starts so that this can be tried again without tripping over any cruft. The current impl is subject, with no obvious way out of it, to starvation in the async proxy.
stephan [Thu, 5 Mar 2026 06:30:57 +0000 (06:30 +0000)]
The opfs-wl lock hang has been traced to starvation between the WebLock and the tight wait-on-VFS-calls Atomics.wait() loop. This can reportedly be resolved with another level of indirection in which the WebLock takes over the wait-on-VFS-calls part until it's unlocked, returning to the global loop when it's done. That exceeds this morning's ambitions but is next to try out.
stephan [Wed, 4 Mar 2026 21:16:36 +0000 (21:16 +0000)]
Add some debugging output to opfs and track down the breakage to the initial WebLock request, which is never reaching its callback. Still broken, but this is progress.
stephan [Wed, 4 Mar 2026 20:33:21 +0000 (20:33 +0000)]
Get opfs-wl plugged in to the concurrency tester. Somewhat ironically, all competing workers fail with locking errors while worker 1 is busy running off the rails somewhere. Stashing for closer investigation later.