dan [Thu, 25 Feb 2021 15:50:19 +0000 (15:50 +0000)]
Ensure that tests like "rbu.test" and "notify2.test" that are only run by specific configurations during release testing are run for both release and debug versions of the tests.
dan [Tue, 23 Feb 2021 16:40:47 +0000 (16:40 +0000)]
When a sub-transaction is released, if no pages required by containing sub-transactions were journaled, truncate the statement journal. This prevents out of control statement journal growth in some cases.
dan [Tue, 23 Feb 2021 15:53:22 +0000 (15:53 +0000)]
Allow WHERE terms to be pushed down into sub-queries that contain window functions, provided that the WHERE term is made up of entirely of constants and copies of expressions found in the PARTITION BY clauses of all window functions in the sub-query.
dan [Mon, 22 Feb 2021 20:56:13 +0000 (20:56 +0000)]
Allow WHERE terms to be pushed down into sub-queries that contain window functions, provided that the WHERE term is made up of entirely of constants and copies of expressions found in the PARTITION BY clauses of all window functions in the sub-query.
dan [Mon, 22 Feb 2021 15:44:45 +0000 (15:44 +0000)]
When a sub-transaction is released, if no pages required by containing sub-transactions were journaled, truncate the statement journal. This might prevent out-of-control statement journal growth in some cases.
dan [Sat, 20 Feb 2021 18:02:37 +0000 (18:02 +0000)]
Update sqlite3changeset_apply_v2() so that it handles no-op UPDATE changes (UPDATE changes that modify no columns). This fixes a regression introduced by [e4ccfac09b]. Also modify sqlite3rebaser_rebase() so that it does not output changesets containing such UPDATEs.
drh [Sat, 20 Feb 2021 14:57:16 +0000 (14:57 +0000)]
Break out the Cte object from the With object. This will make it simpler
to add new kinds of Cte objects (ex: DML statements) and/or MATERIALIZED
keywords in the future. It brings trunk into closer alignment with the
experimental as-materialize branch.
drh [Thu, 18 Feb 2021 15:45:34 +0000 (15:45 +0000)]
Improvement to the INSERT optimization of check-in [16ac213c57196361] so
that it works with SQLITE_ENABLE_HIDDEN_COLUMN but is also easier to maintain
and a little faster as well.
drh [Thu, 18 Feb 2021 14:27:43 +0000 (14:27 +0000)]
Disable the optimization of [16ac213c57196361] when the
SQLITE_ENABLE_HIDDEN_COLUMN compile-time option is used, as the optimization
does not work in that case.
drh [Thu, 18 Feb 2021 00:26:11 +0000 (00:26 +0000)]
Performance optimization in the code generator for INSERT for the common
case where the target table has neither generated nor hidden columns.
Also fix a redundant (and thus unreachable) branch in the resolver.
drh [Wed, 17 Feb 2021 21:13:14 +0000 (21:13 +0000)]
Use the sqlite3ParserAddCleanup() mechanism to ensure that the AggInfo
structure associated with an aggregate query is deallocated, for a performance
increase and size reduction.
drh [Wed, 17 Feb 2021 13:19:22 +0000 (13:19 +0000)]
Enhance the ".once" and ".output" commands in the CLI so that if the
filename argument begins with "|" the name becomes the concatenation
of all subsequent arguments. Hence, commands like ".once | open -f" become
possible without the need for quotes.
dan [Fri, 12 Feb 2021 21:22:01 +0000 (21:22 +0000)]
Fix a test case to account for the fact that different versions of OpenBSD behave differently when a program tries to read() from a file-descriptor open on a directory.
dan [Wed, 10 Feb 2021 17:31:50 +0000 (17:31 +0000)]
In RBU, avoid passing VFS xShmLock calls through to the underlying VFS in cases where xShmMap calls may not be. This fixes a bad interaction with ZipVFS.
drh [Sat, 6 Feb 2021 14:37:36 +0000 (14:37 +0000)]
Fix the OSSFuzz-discovered shift problem from two days ago. This patch was
omitted from [078dbff04a95a001] apparently because I made the edit to
"sqlite3.c" rather than "resolve.c" where it belongs.
drh [Thu, 4 Feb 2021 23:20:13 +0000 (23:20 +0000)]
Change the RETURNING algorithm so that outputs accumulate in an ephemeral
table until all modifications have been completed, and only then do results
start being returned. This should help prevent problems with interleaved
sqlite3_step() calls on two separate DML statements. It also seems to be
closer to how PostgreSQL works, which might prevent compatibility problems.
drh [Thu, 4 Feb 2021 17:29:04 +0000 (17:29 +0000)]
Preliminary changes for a new implementation of RETURNING that captures all
results in a buffer and plays them all back after the DML statement
completes. This avoids problems with interleaved DML statements.
This particular check-in is a non-functional work in progress.
dan [Wed, 3 Feb 2021 14:20:56 +0000 (14:20 +0000)]
Avoid doing any foreign-key constraint related processing for an UPDATE statement that does not modify any columns that are part of FK constraints, even if the table has a self-referencing FK.
drh [Wed, 3 Feb 2021 00:55:34 +0000 (00:55 +0000)]
Modify the SQLITE_DBCONFIG_ENABLE_TRIGGER setting so that it only disables
main-schema triggers and allows TEMP trigger to continue operating. This is
safe, since only the application (not an attacker) can add TEMP triggers.
It will also all us to disengage SQLITE_DBCONFIG_ENABLE_TRIGGER on Fossil
databases since Fossil has no main-schema triggers but does use TEMP triggers.
drh [Sun, 31 Jan 2021 15:50:36 +0000 (15:50 +0000)]
New opcode OP_ChngCntRow used to output the result of PRAGMA change_count.
Only this new opcode, and not OP_ResultRow, checks for foreign key errors.
Faster performance, and now also works with RETURNING.
drh [Sun, 31 Jan 2021 12:41:20 +0000 (12:41 +0000)]
When setting the number of result columns in a RETURNING trigger, be sure
to set that value in the top-level bytecode program, not in the immediate
caller of the trigger.