drh [Mon, 27 Feb 2023 14:48:54 +0000 (14:48 +0000)]
Further to [46639f682975dac6], the parameters of a table valued function that
is on the left side of a RIGHT JOIN do not need to be in the ON clause. Add
new test cases and tags to associated test cases with the code.
stephan [Mon, 27 Feb 2023 07:12:28 +0000 (07:12 +0000)]
Extend wasm build to enable inclusion of client-custom C code, initialized via the SQLITE_EXTRA_INIT mechanism, per discussion in [forum:1e1c04f3ed1bc96b|forum post 1e1c04f3ed1bc96b].
drh [Sun, 26 Feb 2023 20:57:09 +0000 (20:57 +0000)]
When a table-valued function appears as the right table of a RIGHT JOIN,
the argument constraints on the table-valued function should be considered
part of the ON clause of the RIGHT JOIN. Fix for the problem reported
by [forum:/forumpost/422e635f3beafbf6|forum post 422e635f3beafbf6]. Test
cases in TH3. Possibly related to the enhancement at [501609eddf2a46d5].
drh [Sun, 26 Feb 2023 11:36:35 +0000 (11:36 +0000)]
In the [/info/7c2d3406000dc8ac|omit-unused-subquery-columns optimization], be
sure to remove the EP_Skip and EP_Unlikely flags from the result set expressions
that get nulled-out. dbsqlfuzz bf1d3ed6e0e0dd8766027797d43db40c776d2b15.
drh [Fri, 24 Feb 2023 16:04:05 +0000 (16:04 +0000)]
Modify the sqlite3_config() interface so that the SQLITE_CONFIG_LOG and
SQLITE_CONFIG_PCACHE_HDRSZ opcodes can be called after sqlite3_initialize().
Enhancement request [0b75886e6d48f7c2].
drh [Fri, 24 Feb 2023 11:54:40 +0000 (11:54 +0000)]
Slightly faster and more precise floating-point to decimal conversion.
See [forum:/forumpost/d1387c3979c7f557|forum thread d1387c3979c7f557] for
discussion.
drh [Thu, 23 Feb 2023 21:18:47 +0000 (21:18 +0000)]
Increased precision of floating-point to decimal conversions when the
floating point value has no fractional part.
[forum:/forumpost/d1387c3979c7f557|Forum post d1387c3979c7f557]
drh [Thu, 23 Feb 2023 14:22:29 +0000 (14:22 +0000)]
Allow the sqlite3_config() interface to be invoked at any time for a few
choosen options: SQLITE_CONFIG_LOG, SQLITE_CONFIG_URI, and
SQLITE_CONFIG_PCACHE_HDRSZ. This list will likely change before release.
drh [Thu, 23 Feb 2023 01:52:54 +0000 (01:52 +0000)]
Provide -DHAVE_LOG2=0 and -DHAVE_LOG10=0 compile-time options for use on systems
that lack the log2() and log10() standard math library routines, to cause
SQLite to substitute its own alternatives.
drh [Wed, 22 Feb 2023 20:42:15 +0000 (20:42 +0000)]
Remove the push-down optimization restriction that was added by
check-in [1ad41840c5e0fa70] because it is no longer needed after
the enhancements to compound query processing in check-in [27655c9353620aa5]
This resolves the performance regression reported by
[forum:/forumpost/bcc4375032|forum post bcc4375032].
drh [Tue, 21 Feb 2023 12:30:18 +0000 (12:30 +0000)]
Fix formatting and improved documentation on the various sqlite3_file_control()
opcodes. Other minor documentation changes. No changes to working code.
drh [Thu, 16 Feb 2023 18:04:49 +0000 (18:04 +0000)]
Provide an optimization-disable mask for this optimization. Do not do the
optimization if the subquery is an aggregate or is distinct, but allow it to
be an ephemeral subquery. Do not omit columns that are used in the ORDER BY
of the subquery.
drh [Wed, 15 Feb 2023 17:53:17 +0000 (17:53 +0000)]
Do not compute result columns of subqueries that are never used. Make those
columns NULL instead. This optimization potentially resolves the enhancement
request described by [/tktview/baa5bb76c35a124c|ticket baa5bb76c35a124c].
drh [Mon, 13 Feb 2023 12:46:22 +0000 (12:46 +0000)]
In the LIKE optimization, do not analyze the new virtual WHERE clause terms
until both have been added, since they are expected to be consecutive and
the analysis might add complementary terms.
This fixes a problem caused by [44200596aa943963] and discovered by dbsqlfuzz
and recorded as case 7e3b5983727d843b910b2d9ab556e4afcd777cfb.
drh [Fri, 10 Feb 2023 21:53:33 +0000 (21:53 +0000)]
Do a better job of detecting when a WHERE clause term might be useful to
an expression index. Fix for performance regression reported by
[forum:/forumpost/e65800d8cb|forum thread e65800d8cb].
dan [Fri, 10 Feb 2023 17:17:04 +0000 (17:17 +0000)]
Fix a problem with the fts5 trigram tokenizer and LIKE or GLOB patterns for which contain runs of 2 or fewer non-wildcard characters that are 3 or more bytes when encoded as utf-8.
drh [Thu, 9 Feb 2023 15:32:24 +0000 (15:32 +0000)]
Disable the double-quoted string misfeature by default in CLI builds.
DQS can be reenabled at run-time using the ".dbconfig dqs_dml" and
".dbconfig dqs_ddl" dot-commands.
drh [Wed, 8 Feb 2023 20:29:48 +0000 (20:29 +0000)]
Back out the 'txn' enhancement to date/time functions. The duration of a
"transaction" is confused and needs to be straightened out prior to moving
forward with this change.
drh [Wed, 8 Feb 2023 12:01:48 +0000 (12:01 +0000)]
Revert the behavior of date/time functions with no arguments so that they
once again work like 'now', even while CURRENT_TIMESTAMP and similar work
like 'txn'.
drh [Wed, 8 Feb 2023 11:34:05 +0000 (11:34 +0000)]
Change the behavior of date-time functions without any arguments (and thus
the CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP variables) so that they
work like 'txn' instead of like 'now'. This is an incompatibility with legacy,
but brings SQLite into conformance with all other SQL systems.
drh [Sun, 5 Feb 2023 20:29:10 +0000 (20:29 +0000)]
Do not use a Bloom filter if any outer loop lacks STAT1 data, since without
STAT1 data, the query planner cannot make an accurate determination of
whether or not a Bloom filter will be useful. This fixes the problem
reported by [forum:/forumpost/56de336385|forum post 56de336385].
drh [Sun, 5 Feb 2023 00:47:27 +0000 (00:47 +0000)]
Restore a test for pBt NULL that was removed by [12a14711afa6cddb] but turned
out to be necessary, as dbsqlfuzz quickly showed us. Test case added to TH3.