drh [Fri, 9 Aug 2024 02:10:28 +0000 (02:10 +0000)]
Change the null-cursor in the previous check-in into a death-cursor. Any
access of the cursor causes the prepared statement to return an
SQLITE_INTERNAL error. We'll need to add a way to edit the bytecode
using sqlite3_test_control() in order to test the death-cursor code path.
drh [Fri, 9 Aug 2024 01:38:14 +0000 (01:38 +0000)]
If there is any question about whether or not the WHERE_IDX_ONLY flag in the
query planner is correct, create a backup null-cursor for the table, so that
we never try to run an OP_Column against an unopened cursor.
drh [Thu, 8 Aug 2024 14:45:50 +0000 (14:45 +0000)]
Do not let the number of terms on a VALUES clause be limited by
SQLITE_LIMIT_COMPOUND_SELECT, even if the VALUES clause contains elements
that appear to be variables due to the use of double-quoted string literals.
[https://issues.chromium.org/issues/358174302|Chromium issue 358174302].
drh [Thu, 8 Aug 2024 12:14:07 +0000 (12:14 +0000)]
Back out the --memory option to ".parameter init" in the CLI, as the
capability is no longer needed for testing due to the new "$int_N" and
"$text_T" automatic bindings, and the "init --memory" is hence just
added complication.
drh [Thu, 8 Aug 2024 12:08:36 +0000 (12:08 +0000)]
In the CLI, recognize magic parameter names "$int_NNN" and "$text_TTT" and
bind them with integer value NNN and text value TTT respectively. Intended
for testing and debugging use only.
drh [Thu, 8 Aug 2024 10:10:38 +0000 (10:10 +0000)]
Add the --memory option to the ".parameter init" CLI command. When present,
the --memory option causes the sqlite_parameters table to be created in a
completely independent :memory: database. This can be done to avoid
parameter binding queries from being affected by debug settings such as
".wheretrace", ".treetrace", "PRAGMA vdbe_addoptrace=on", and similar.
drh [Tue, 6 Aug 2024 10:29:41 +0000 (10:29 +0000)]
Change the AggInfoColumnReg() and AggInfoFuncReg() macros for
compilers that cannot parse empty elements of a comma expression.
[forum:/forumpost/8fd21998dc|Forum post 8fd21998dc].
drh [Sat, 3 Aug 2024 23:00:17 +0000 (23:00 +0000)]
Fix to the previous checkin: The colUsed parameter should have high-order bit
set if any of the 64-th or greater columns of the virtual table is used. The
lower 63 bits of colUsed always show the usage of the first 63 columns of the
virtual table.
drh [Sat, 3 Aug 2024 15:55:25 +0000 (15:55 +0000)]
Add the --status option to the test runs using testrunner.tcl. Only works
on Unix platforms. The "exec" command appears to interfere with VT100
escape codes on windows.
drh [Thu, 1 Aug 2024 23:30:29 +0000 (23:30 +0000)]
Simplification the ./configure script. Carry Makefile CFLAGS and OPTS through
into builttclext.tcl. Fix a bug in tclsqlite.c introduced by the previous
check-in.
drh [Thu, 1 Aug 2024 18:10:00 +0000 (18:10 +0000)]
Clean up and restructure the TCL configuration sections in autoconf.
The new --with-tclsh=FILE option lets you select the specific tclsh
that you want to run.
Fix the tclsqlite.c TCL interface module so that it works with both Tcl8 and
Tcl9. Make changes across the TCL-based test harness to enable SQLite to
be tested with either Tcl8 or Tcl9. Get the --with-tcl= argument on the
configure script working. Testing changes only - no changes to the SQLite core.
I believe the previous merge attempt didn't work because of errors in the
merge itself, not because of faults in the code. Trying again...
Fix the tclsqlite.c TCL interface module so that it works with both Tcl8 and
Tcl9. Make changes across the TCL-based test harness to enable SQLite to
be tested with either Tcl8 or Tcl9. Get the --with-tcl= argument on the
configure script working. Testing changes only - no changes to the SQLite core.
Fix a typo in testrunner_data.tcl that prevented --with-tcl specifications
from being carried through into sub-builds. Adjust test cases to account
for new floating-point differences discovered when --with-tcl was fixed.
Implement a new comparison routine to compare text renderings of
floating point values. This gets the number of failures down to just 5.
But the routine needs work, and probably refactoring.
All tests in "make test" now pass with Tcl9, except for about 198 cases where
the error involves small differences in the rendering to floating point
values.
More adjustments to the incrblob channel: Apparently you need to wait
until the close2Proc is called with a flag of 0 before actually shutting
down the channel.
Tcl_ChannelType implementations for Tcl9 apparently require that
wideSeekProc be implemented. Also adjust minor test script issues for
fts5 tests so that they can be run sequentially and so that they do not
depend on the specific floating point output formats generated by Tcl.
stephan [Wed, 24 Jul 2024 23:58:28 +0000 (23:58 +0000)]
wasm minimal build: strip authorizers and JSON support (saves approx 35kb). Strip vtab support from the JS bits but cannot yet strip it from the C bits because that requires a custom-configured sqlite3.c.
Enhance the percentile() extension function to include the median()
variant. Update the implementation to implement its own sorting
algorithm, so that the extension no longer depends on qsort().
stephan [Mon, 22 Jul 2024 21:21:25 +0000 (21:21 +0000)]
Move a block of JS code which was inadvertently (and harmlessly) moved in the previous checkin. Clarify the semantics of an internal-use-only API. Add another WAL-related JS test.
stephan [Mon, 22 Jul 2024 20:58:51 +0000 (20:58 +0000)]
OPFS VFSes: remove the on-open() pragma calls, as those (A) already reflected the build-time default settings and (B) they made it illegal to run locking_mode=exclusive, which is a requirement for WAL mode without shared memory. Modify part of the test suite to demonstrate that the SAHPool VFS can run in WAL mode so long as locking_mode=exclusive is used.
stephan [Sat, 13 Jul 2024 01:02:57 +0000 (01:02 +0000)]
Add an option to the opfs-sahpool VFS which tells it to ignore a previous init failure and retry, as an opt-in workaround for a browser quirk which occasionally denies OPFS access on the first attempt and permits it on subsequent attempts. This resolves [https://github.com/sqlite/sqlite-wasm/issues/79|issue #79 of the npm distribution].
stephan [Fri, 12 Jul 2024 13:49:54 +0000 (13:49 +0000)]
Work around a difficult-to-trigger Atomics API message-passing quirk in the OPFS VFS which appears in rare instances in some browsers when running high I/O loads. This resolves [https://github.com/sqlite/sqlite-wasm/issues/12 | issue #12 of the npm distribution].
stephan [Fri, 12 Jul 2024 13:45:15 +0000 (13:45 +0000)]
sqldiff: if the first db argument does not exist, fail instead of creating an empty db. Resolving that for the second argument is trickier, as discussed in [forum:ec2d429e32 | forum post ec2d429e32].