drh [Thu, 15 Aug 2024 23:38:52 +0000 (23:38 +0000)]
If a subquery is materialized due to an ORDER BY and that ordering is useful
in helping to satisfy the ORDER BY or GROUP BY in the order query without
doing an extra sort, then omit the extra sort.
drh [Sat, 10 Aug 2024 10:05:22 +0000 (10:05 +0000)]
Enhancements to covering-index prediction. In particular, avoid the
false-positive prediction described by
[forum:/forumpost/e60e4c295d22f8ce|forum post e60e4c295d22f8ce].
Add early detection of over-prediction of covering-indexes so that
sqlite3_prepare() will return an error rather than just generate bad
bytecode.
drh [Fri, 9 Aug 2024 18:18:11 +0000 (18:18 +0000)]
Fix the internal routine sqlite3ResolveExprListNames() so that it returns
SQLITE_OK or SQLITE_ERROR instead of WRC_Continue or WRC_Abort. Without this
fix, some times of obscure syntax errors end up returning SQLITE_INTERNAL
rather than SQLITE_ERROR.
drh [Fri, 9 Aug 2024 17:09:18 +0000 (17:09 +0000)]
Do not attempt to use a covering index based purely on columns-used
when doing an UPDATE or DELETE of a WITHOUT ROWID table. Raise an
SQLITE_INTERNAL error if there is ever a situation where a table reference
cannot be converted into an index reference when the query planner thinks
that a covering index is appropriate.
stephan [Fri, 9 Aug 2024 12:19:11 +0000 (12:19 +0000)]
Remove unused static var cBadGroup from ext/consio/console_io.c to resolve a compiler warning reported in the fossil forum. This is a build fix, not a functional change.
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.