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.
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 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].
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().
drh [Sat, 29 Nov 2025 12:06:12 +0000 (12:06 +0000)]
Fix an assertion fault in sqlite3Dequote() that can occur with
ALTER TABLE DROP CONSTRAINT on a corrupt schema.
dbsqlfuzz 509a778e8a0c21a6448003feb773a1e55ed751e7. Test case in TH3.
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.
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.
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].
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.