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.
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.
drh [Tue, 5 Mar 2024 16:47:48 +0000 (16:47 +0000)]
The value returned by the json_each.json field needs to survive longer than
the json_each virtual table itself, in the event that the value is used in
an aggregate expression. dbsqlfuzz 5120bd0b3bb0b73eebbcb79ac37c6b0663fccad6
stephan [Tue, 5 Mar 2024 12:48:26 +0000 (12:48 +0000)]
/fiddle: reorder/replace example entries to make them more coherent when tried in order and clear the example selection list when the input area is cleared, both based on forum feedback.
stephan [Tue, 5 Mar 2024 06:31:37 +0000 (06:31 +0000)]
/fiddle: before resetting a db, roll back any transactions (resolves problem reported in [forum:0b41a25d65|forum post 0b41a25d65]) and remove an obsolete/broken reference to a long-gone API which could cause initialization to fail prematurely.
drh [Mon, 4 Mar 2024 13:58:09 +0000 (13:58 +0000)]
Adjust date/time functions so that they do a better job of keeping track
of whether the current time is UTC or localtime, and no-op the 'utc' and
'localtime' modifiers accordingly. See
[forum:/info/e7a939e074|forum post e7a939e074].
Also add the datedebug() function, available
only under -DSQLITE_DEBUG, for improved visibility of the DateTime object
during debugging and testing.
stephan [Mon, 4 Mar 2024 09:56:47 +0000 (09:56 +0000)]
Document why the wasm build does not use Emscripten's -sSTRICT=1 flag and account for a behaviour change in emsdk 3.1.55 regarding the HEAPxyz symbols.
stephan [Mon, 4 Mar 2024 09:23:52 +0000 (09:23 +0000)]
When warning about multiple invocations of JS's sqlite3ApiBootstrap(), use the warning logger installed by the first invocation, rather than console.warn.
stephan [Mon, 4 Mar 2024 06:54:41 +0000 (06:54 +0000)]
After wasm bootstrapping has read the optional global-scope config objects, delete those objects because any further changes would not have any useful effect. Expand the docs regarding the sqlite3ApiBootstrap() config object and explain the necessary evil of a separate global-scope object for that configuration.
drh [Sat, 2 Mar 2024 21:02:41 +0000 (21:02 +0000)]
New date/time modifiers "mnth" and "yr" work like "month" and "year" but
resolve day-of-month overflow by truncating rather than rolling over into
the next month. [forum:/forumpost/232d1abb5d|Forum thread 232d1abb5d]
drh [Sat, 2 Mar 2024 13:38:46 +0000 (13:38 +0000)]
Proof-of-concept for new time-interval operator "pg-month" and "pg-year" that
use the truncate-to-month algorithm for month overflow instead of the
wrap-to-next-month algorithm that is used by SQLite by default.
stephan [Tue, 27 Feb 2024 11:02:31 +0000 (11:02 +0000)]
Extend sqlite3.c makefile rule to support EXTRA_SRC=list-of-c-files to append to the generated sqlite3.c, as discussed in/around [forum:ccda88cf6f1754c5|forum post ccda88cf6f1754c5].