drh [Tue, 19 Mar 2024 23:01:56 +0000 (23:01 +0000)]
Change the SQLITE_CONFIG_NO_ROWID_IN_VIEW configuration option to be
just SQLITE_CONFIG_ROWID_IN_VIEW (without the "_NO_" in the middle) and give
it the ability to turn the option on and off. Otherwise, it is difficult
to test.
drh [Tue, 19 Mar 2024 16:34:32 +0000 (16:34 +0000)]
In the name resolver when SQLITE_ALLOW_ROWID_IN_INDEX is enabled, if there
are multiple views that might resolve to the "rowid" but only one real table,
then use that one real table and ignore the views.
drh [Tue, 19 Mar 2024 14:38:39 +0000 (14:38 +0000)]
Fix the fuzzinvariants.c test module so that it does not generate
invariants that depend on rowid when SQLITE_ALLOW_ROWID_IN_VIEW is used,
since rowid values can be unreliable in that context.
drh [Tue, 19 Mar 2024 13:31:54 +0000 (13:31 +0000)]
When compiled with SQLITE_ALLOW_ROWID_IN_VIEW, rowid-in-view is on by default
but can now be turned off using SQLITE_TESTCTRL_ROWID_IN_VIEW. Without the
compile-time option, rowid-in-view is always off.
drh [Tue, 19 Mar 2024 10:16:17 +0000 (10:16 +0000)]
Fix another problem from [c63e26e705f5e967] involving infinities and the
Kahan-Babushka-Neumaier summation algorithm. Problem reported by
[forum:/forumpost/23b8688ef4|forum post 23b8688ef4].
drh [Tue, 19 Mar 2024 02:30:24 +0000 (02:30 +0000)]
First steps toward getting -DSQLITE_ALLOW_ROWID_IN_VIEW to work again. That
compile-time option is untested, undocumented, and unsupported. But it was
mentioned in the release notes for version 3.36.0, so I think that means we
need to support it forever.
drh [Mon, 18 Mar 2024 18:00:17 +0000 (18:00 +0000)]
Add the "VALUES-as-coroutine" optimization. Large VALUES clauses on an
INSERT, for example, prepare and run in about half the time and with half
the memory. This check-in also includes enhancements to the internal
sqlite3ExprIsConstant() routine to recognize pure SQL functions as constant
if they have constant arguments.
drh [Sat, 16 Mar 2024 13:18:48 +0000 (13:18 +0000)]
Enhance the sqlite3ExprIsConstant() function so that it recognizes
constant functions. So far the enhancement only applies to the multi-row
VALUES clause, but it could possibly be applied in many other places.
drh [Fri, 15 Mar 2024 13:16:13 +0000 (13:16 +0000)]
Tweaks to the func4.test test module (which tests the rarely used totype.c
extension) so that it works on i586 compiled using gcc-13 with -O0. Details
at [forum:/forumpost/0a7553b0f734c033|forum post 0a7553b0f734c033].
dan [Thu, 14 Mar 2024 17:04:18 +0000 (17:04 +0000)]
Avoid some OP_SCopy instructions in "INSERT INTO .. VALUES" statements that insert more than one row in cases where the VALUES clause contains a value for all columns of the table.
drh [Wed, 13 Mar 2024 10:55:47 +0000 (10:55 +0000)]
Improvements to the "help" message generated by testrunner.tcl. Add the
special "list" permutation that does nothing but list all allowed
values for the PERMUTATION argument to testrunner.tcl.
drh [Wed, 13 Mar 2024 00:37:37 +0000 (00:37 +0000)]
On testrunner.tcl: (1) Add the "help" command. (2) Add the "script" command
to the help message. (3) Improve the error message generated by "script" when
an incorrect CONFIG option is provided.
drh [Mon, 11 Mar 2024 11:24:59 +0000 (11:24 +0000)]
Fix the ".import" command in the CLI so that it works correctly with tables
that contain computed columns.
[forum:/forumpost/ca014d7358|forum post ca014d7358].
stephan [Mon, 11 Mar 2024 09:34:38 +0000 (09:34 +0000)]
Add delete-before-open=1 URI flag to the 'opfs' VFS to tell it to xDelete the db file before opening it, primarily to enable users to work around a corrupt db without having to reach into OPFS-specific APIs to remove the db file.
stephan [Mon, 11 Mar 2024 09:32:38 +0000 (09:32 +0000)]
Add delete-before-open=1 URI flag to the 'opfs' VFS to tell it to xDelete the db file before opening it, primarily to enable users to work around a corrupt db without having to reach into OPFS-specific APIs to remove the db file.
drh [Sat, 9 Mar 2024 13:31:10 +0000 (13:31 +0000)]
Fuzzcheck is run automatically by testrunner.tcl, so there is no need to
include fuzzcheck as a separate dependency for the releasetest target in
the MSVC makefile.
drh [Fri, 8 Mar 2024 21:37:18 +0000 (21:37 +0000)]
The NOT NULL strength reduction optimization from [de9c86c9e4cdb34f] should
be applied to the WHERE clause only. Otherwise, the operand of the IS NULL
or IS NOT NULL operator might be a reference to a bare column of an
aggregate table, and we can't tell if it is NULL or not based only on its
NOT NULL attribute. [forum:/forumpost/440f2a2f17|Forum post 440f2a2f17].
drh [Fri, 8 Mar 2024 14:01:48 +0000 (14:01 +0000)]
Silently ignore redundant ON CONFLICT clauses in an UPSERT. Only the first
ON CONFLICT for each index is active. Do not issue an error, since that might
break legacy queries. But ignore the redundant ON CONFLICT clauses to prevent
problems such as described in [forum:/forumpost/919c6579c8|forum post 919c6579c8].
drh [Fri, 8 Mar 2024 03:24:09 +0000 (03:24 +0000)]
Must use sqlite3IntFloatCompare() for accurate comparisons between very large
integer and floating point values in RTREE. Otherwise the comparison does
not work on all platforms. Further fix to [027e5336acc26f57].
stephan [Thu, 7 Mar 2024 18:53:27 +0000 (18:53 +0000)]
Resolve duplicate loading of promiser v2 demo code (a side effect of having done precisely what it was told to do). Consolidate demo-worker1-promiser(-esm).html/(m)js variants into central copies processed with c-pp.
stephan [Thu, 7 Mar 2024 16:04:43 +0000 (16:04 +0000)]
Initial work at getting sqlite3Worker1Promiser.v2() to return a Promise instead of using an onready() callback, and also creating an ESM build for promiser1 per user request. It seems to work but requires more testing.
drh [Thu, 7 Mar 2024 12:34:26 +0000 (12:34 +0000)]
Do not allow the query planner to be tricked into thinking that an index on a
constant expression might be useful for something. Problem reported on
[forum:/forumpost/ecdfc02339|forum post ecdfc02339]. This is a follow-up
to the fixes at [44200596aa943963] and [2d2b91cc0f6fed8c].
drh [Wed, 6 Mar 2024 14:30:42 +0000 (14:30 +0000)]
Add the json_pretty(J) function for pretty-printing of JSON. An optional
2nd argument is text used for indentation, with a default value being four
spaces.