drh [Sat, 13 Dec 2025 21:11:49 +0000 (21:11 +0000)]
In the CLI, if a command-line argument names a file and the filename ends
with .sql or .txt, then process that file as an SQL script. Use this
feature for better testing.
drh [Fri, 12 Dec 2025 12:06:42 +0000 (12:06 +0000)]
Add new assert() statements designed to detect and prevent the kind
of system interface numbering errors that happened in [108691a3cb2f296f]
and that were not fixed until [fe49703034bd23fa].
drh [Wed, 10 Dec 2025 16:10:26 +0000 (16:10 +0000)]
Add the --titlelimit option to CLI, defaulting to 20. In "line" mode of
the CLI, the default seperator is changed from " = " to ": ". This can be
overridden using the --colsep option.
dan [Tue, 9 Dec 2025 13:41:01 +0000 (13:41 +0000)]
In fts5, avoid holding an open blob handle after an INSERT/UPDATE/DELETE statement, as this can interfere with sqlite3_interrupt(). Forum post [forum:/forumpost/95413eb410 | 95413eb410].
stephan [Mon, 8 Dec 2025 13:06:27 +0000 (13:06 +0000)]
Introducing kvvfs v2 for the JS bindings. Summary: no longer hard-coded to session/localStorage, available outside of the main UI thread (non-persistently), a simpler-to-use import/export API, and adds an asynchronous event interface intended for creating page-by-page db backups.
drh [Sat, 6 Dec 2025 20:41:24 +0000 (20:41 +0000)]
In the zipfile extension, only return as many bytes as Inflate actually
generated. [forum:/forumpost/761eac3c82|Forum post 761eac3c82].
Adjust ./configure so that it builds zipfile into testfixture if ZLIB
is available, so that tests get run on unix platforms.
drh [Sat, 6 Dec 2025 11:54:43 +0000 (11:54 +0000)]
Fox the "box" format, use rounded corners and use a double-line to separate
the header from the content. Add the "-quote relaxed" text rendering mode
and make it the default for TTYs.
drh [Fri, 5 Dec 2025 19:45:43 +0000 (19:45 +0000)]
In the Windows Makefile.msc, never set -DNDEBUG. And add the "env" target
which prints out the value of all 127 configuration variables that
Makefile.msc uses.
drh [Fri, 5 Dec 2025 12:22:23 +0000 (12:22 +0000)]
Enhance the unixIsSharingShmNode() code (check-in [6385a1962c69c69c])
so that it more understandable by humans, and so that it does not trigger
false positive deadlock warnings in TSAN.
drh [Fri, 5 Dec 2025 01:33:23 +0000 (01:33 +0000)]
Another fix to [e33da6d5dc964db8]: Ensure that the EXISTS-to-JOIN break
happens even if the inner loop is a "no-op" loop that never executes more
than once because it is controlled by a UNIQUE index. This resolves the
error reported in [forum:/forumpost/7992838ba2|forum post 7992838ba2].
Test cases are in TH3.
dan [Thu, 4 Dec 2025 16:44:11 +0000 (16:44 +0000)]
Limit compile time value SQLITE_MAX_SQL_LENGTH to 1024 less than 2^31, or 2147482624. This is to avoid having to deal with edge cases related to 32-bit integer overflow that can only occur in custom builds.
drh [Thu, 4 Dec 2025 00:05:49 +0000 (00:05 +0000)]
Fix an incorrect answer that might arise if a scalar query is both
DISTINCT and contains an OFFSET clause.
[forum:/forumpost/2025-12-03T09:25:59Z|Forum post 2025-12-03T09:25:59Z].
drh [Wed, 3 Dec 2025 21:31:53 +0000 (21:31 +0000)]
More aggressive optimization of IS NULL and IS NOT NULL operators in
the parser. New sqlite3ExprInt32() internal interface for creating
integer nodes in an expression tree.
dan [Wed, 3 Dec 2025 14:39:25 +0000 (14:39 +0000)]
Fix a problem that could occur when a scalar subquery had both a DISTINCT and OFFSET clause. First reported by [forum:41bd7af485 | forum post 41bd7af485].
stephan [Tue, 2 Dec 2025 18:28:22 +0000 (18:28 +0000)]
kvvfs: make the filename suffixes -wal and -shm illegal and teach xAccess() to silently not fail for illegal names (else it breaks things when a -wal file is checked for).
dan [Tue, 2 Dec 2025 14:43:59 +0000 (14:43 +0000)]
Fix a problem with ALTER TABLE DROP COLUMN commands where the column being dropped is the rightmost in table and is immediately preceded by a comment containing a "," character.
stephan [Mon, 1 Dec 2025 22:20:54 +0000 (22:20 +0000)]
Begrudingly allow sqlite3_js_kvvfs_clear() to work for opened storage only for the local/session storage cases and only (one of the demo apps reminds me) for backwards compatiblity. Likewise, the JsStorageDb.clearStorage() inherited method is now deprecated because it requires an opened db (but continues to work for those two stores), whereas its 'static' method of the same name is unaffected. Rename kvvfs.size() to kvvfs.estimateSize().
drh [Sun, 30 Nov 2025 23:09:24 +0000 (23:09 +0000)]
Tweaks to the wcwidth() algorithm in QRF, for better agreement with
the Terminal on Ubuntu. There is no perfect solution, as different
ttys do things differently, but we should try to get as close as we
can.
stephan [Sun, 30 Nov 2025 08:32:52 +0000 (08:32 +0000)]
Rename kvvfs's 'localThread' storage object to '.'. Swap kvvfs.listen()'s elideJournal(=false) option with includeJournal(=false) (i.e. opt in instead of opt out).
stephan [Sun, 30 Nov 2025 07:25:59 +0000 (07:25 +0000)]
Add sqlite3_db_handle() to the list of functions which are guaranteed to preserve the current error state, per request in [forum:8e79e8ddd5|forum post 8e79e8ddd5].
stephan [Sun, 30 Nov 2025 05:20:17 +0000 (05:20 +0000)]
Extend the kvvfs.listen() config to enable posting of raw binary db pages instead of the kvvfs-encoding. This is much more expensive but was added to... Demonstrate basic async streaming of kvvfs db page-level changes via logging of kvvfs write/delete ops.
stephan [Sun, 30 Nov 2025 03:02:06 +0000 (03:02 +0000)]
Extend kvvfs export to optionally export the raw binary db pages as a list of Uint8Array instead of kvvfs-encoded strings. This is typically much larger but the pages can then be used as-is.
stephan [Sat, 29 Nov 2025 23:29:07 +0000 (23:29 +0000)]
Add a WASM-side export for kvvfsDecode() for pending private use in the kvvfs export bits and ensure that it consistently returns -1 for malformed input.
drh [Sat, 29 Nov 2025 18:32:25 +0000 (18:32 +0000)]
Update the documentation to sqlite3_str_finish(). That function might
not return NULL on an empty string now, if the empty string is created
through the use of sqlite3_str_truncate().