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].
stephan [Thu, 11 Jul 2024 12:36:28 +0000 (12:36 +0000)]
Proposed workaround for the "errant op" case in the OPFS VFS, as discussed in [https://github.com/sqlite/sqlite-wasm/issues/12 | issue #12 of the npm distribution].
stephan [Thu, 11 Jul 2024 11:04:17 +0000 (11:04 +0000)]
Add an option to force the opfs-sahpool VFS init to re-run after it fails on a first attempt, as a workaround for flaky environments where initial access to OPFS sync access handles is rejected but then permitted on a second attempt. Reported and discussed in [https://github.com/sqlite/sqlite-wasm/issues/79|issue #79 of the npm distribution].
Use a mini Bloom filter to help reduce the number of pointless searches for
prior SubrtnSig objects when generating code for IN operators with subqueries
as their right operand.
Disable the reuse of IN-clause subqueries if the subquery is an explicit
"SELECT ALL". The ALL keyword is almost never used in actual practice (most
developers don't even know it can be used) so this should not interfere with
the optimization, but it does give us a convenient way to turn it off for
testing purposes.
Be more aggressive about reusing subqueries that appear on the RHS of IN
operators that have been replicated due to the predicate push-down optimization.
stephan [Thu, 4 Jul 2024 09:45:23 +0000 (09:45 +0000)]
For shell completion, use pragma_table_xinfo instead of pragma_table_info, so that generated columns are handled, as reported in [forum:f0735e05d8d7e857|forum post f0735e05d8d7e857].
Reword the deliberate_fall_through macro along the lines suggested by
[forum:/forumpost/7ec11023dd|forum post 7ec11023dd] so that it works better
with LLVM, while preserving compatibility with MSVC and older GCCs.
In the CLI, if the XDG_CONFIG_HOME environment variable is not set, then also
search in ~/.config/sqlite3/sqliterc for the initialization file.
See [forum:/forumpost/5cc6d059e9e092ed|forum thread 5cc6d059e9e092ed].
drh [Sat, 29 Jun 2024 12:22:32 +0000 (12:22 +0000)]
Add a NEVER() around a branch in sqlite3ExprAffinity() that is designed to
prevent an infinite loop, but which can now never be reached due to recent
changes.
drh [Fri, 28 Jun 2024 17:14:00 +0000 (17:14 +0000)]
Do not convert an expression node that is already TK_REGISTER into a
new TK_REGISTER. This is a follow-up to [663f5dd32d9db832] that fixes a
bug discovered by dbsqlfuzz.
drh [Wed, 19 Jun 2024 16:38:17 +0000 (16:38 +0000)]
Enhance lemon.c so that when it shows the compile-time options in the header
comment of the generated output file, it shows all options, even those not
used, and it shows them in sorted order.