drh [Fri, 23 Aug 2019 13:32:03 +0000 (13:32 +0000)]
Invert the meaning of the regBignull flag so that it is 1 when doing the
normal scan and 1 when scanning nulls. This enables the re-do jump at the
bottom of the loop to be coded with a single OP_IfNotZero opcode, rather
than a sequence of OP_If, OP_Integer, OP_Goto.
drh [Thu, 22 Aug 2019 00:53:16 +0000 (00:53 +0000)]
Fix the OP_SeekGE, OP_SeekGT, OP_SeekLE, and OP_SeekLT opcodes so that they
preserve the datatype of the value in the register used as the key.
Ticket [d9f584e936c7a8d0]
dan [Tue, 20 Aug 2019 14:43:01 +0000 (14:43 +0000)]
Fix a segfault that could occur following an OOM while processing a SELECT statement for which one or more of the expressions in the window frame declaration are themselves sub-selects that use window functions.
dan [Tue, 20 Aug 2019 11:43:44 +0000 (11:43 +0000)]
Retain the affinity of an expression in a WHERE clause when it is transformed to a reference to an index column on the same expression. Fix for [f043b113].
dan [Sat, 17 Aug 2019 19:13:49 +0000 (19:13 +0000)]
When populating an ephemeral b-tree for the RHS of an IN(...) clause, avoid applying an affinity to a value that may be used later on for some other purpose. Fix for [c7a117190].
drh [Sat, 17 Aug 2019 17:07:15 +0000 (17:07 +0000)]
Ensure the functions that appear to be constant are not factored out of
expression that originate on the right-hand side of a LEFT JOIN.
Ticket [6710d2f7a13a2997]
drh [Thu, 15 Aug 2019 21:27:20 +0000 (21:27 +0000)]
Add the SQLITE_DBCONFIG_ENABLE_VIEW option, together with a "db config"
command in the TCL interface that can access that option as well as all the
other sqlite3_db_config() boolean options.
drh [Thu, 15 Aug 2019 14:35:45 +0000 (14:35 +0000)]
Ensure that the optional "sz=N" parameter that can be manually added to the
end of an sqlite_stat1 entry does not have an N value that is too small.
Ticket [e4598ecbdd18bd82]
drh [Thu, 15 Aug 2019 00:04:44 +0000 (00:04 +0000)]
Early detection out-of-bounds page numbers on the direct-overflow-read
optimization gives consistent error messages regardless of whether or not
the optimization is enabled.
dan [Mon, 12 Aug 2019 16:36:38 +0000 (16:36 +0000)]
Experimental implementation of NULLS FIRST/LAST. This branch still has problems - the most significant of which is that ORDER BY clauses with a non-default NULLS FIRST/LAST qualifier can never use an index.
drh [Sat, 10 Aug 2019 15:06:03 +0000 (15:06 +0000)]
Fix the sqliteExprImpliesExpr() routine so that it recognizes that
"(NULL IS FALSE) IS FALSE" doe not implie "NULL NOT NULL".
Ticket [9080b6227fabb466]
drh [Thu, 8 Aug 2019 19:19:42 +0000 (19:19 +0000)]
Remove support for SQLITE_ENABLE_STAT3. The sqlite_stat3 table is now ignored,
if it exists. Run ANALYZE using STAT4 to get the equivalent functionality,
which presumably everybody has been doing for a long time now.
drh [Thu, 8 Aug 2019 15:24:17 +0000 (15:24 +0000)]
Remove support for STAT3. The sqlite_stat3 tables are ignored, if they
exist. STAT4 continues to work as it always has, and as it is a superset of
STAT3 is the recommended replacement.
dan [Wed, 7 Aug 2019 18:34:21 +0000 (18:34 +0000)]
Add "set TMP=%CD%" to the start of each msvc script output by releasetest_data.tcl. Otherwise, since binaries compiled with SQLITE_TEST all choose the same sequence of pseudo-random numbers, collisions between temp file names cause errors when running multiple tests in parallel.
drh [Tue, 6 Aug 2019 15:32:42 +0000 (15:32 +0000)]
Ensure that columns of views and sub-queries that are expressions with
no affinity are comparied without any type conversions, as required in the
documentation. Tickets [61c853857f40da49] and [d52a29a9e6bc55c5].
drh [Tue, 6 Aug 2019 14:37:24 +0000 (14:37 +0000)]
Use 0x40 (ASCII '@') instead of 0x00 to mean "no affinity" so that columns
with no affinity can appear in a zero-terminated string. Use the new
SQLITE_AFF_NONE macro for this new magic number.
dan [Mon, 5 Aug 2019 20:53:19 +0000 (20:53 +0000)]
Ensure that columns of views and sub-queries that are expressions with no affinity are not assigned BLOB affinity. This matches the documentation. Fix for [61c853857f40da49].
drh [Mon, 5 Aug 2019 19:32:06 +0000 (19:32 +0000)]
One of two options on how to address ticket [61c853857f40da49]. In this
mode, we back out the documentation change of
[https://www.sqlite.org/docsrc/info/07b7749da88d54e5|[07b7749da88d54e5]]
and change the core to work as it has been documented to work since 2017,
rather than how it has actually worked since 2009.
drh [Mon, 5 Aug 2019 18:01:42 +0000 (18:01 +0000)]
Refactor field Expr.affinity into Expr.affExpr to avoid confusion with other
fields and variables named "affinity" and display affExpr it in
sqlite3TreeViewExpr() output.
dan [Mon, 5 Aug 2019 13:19:25 +0000 (13:19 +0000)]
Fix a problem with renaming a table when a view or trigger within the schema uses a FILTER with an aggregate function that is not currently registered with the database.
drh [Sat, 3 Aug 2019 01:39:20 +0000 (01:39 +0000)]
Give the SQLITE_TESTCTRL_PRNG_SEED two arguments. The second argument if not
NULL is a pointer to a database connection which seeds the connection from
its schema cookie. In this way, fuzzers can control the PRNG seed.
dan [Fri, 2 Aug 2019 19:40:01 +0000 (19:40 +0000)]
If a query like "SELECT min(a), b FROM t1" visits no rows where "a" is not null, extract a value for "b" from one of the rows where "a" is null. Fix for ticket [41866dc37].
dan [Fri, 2 Aug 2019 18:43:59 +0000 (18:43 +0000)]
If a query like "SELECT min(a), b FROM t1" visits no rows where "a" is not null, extract a value for "b" from one of the rows where "a" is null. Possible fix for ticket [41866dc37].
drh [Thu, 1 Aug 2019 22:48:45 +0000 (22:48 +0000)]
The sqlite3_set_authorizer() interface should only expire prepared statements
when it is setting a new authorizer, not when clearing the authorizer. And
statements that are running when sqlite3_set_authorizer() is invoked should be
allowed to continue running to completion.