Only run the OP_OpenRead opcodes for a correlated subquery once, on the initial
iteration. Keep the cursor open for subsequent runs. This was suppose to be a
performance enhancement, but it is difficult to come up with a query where
is makes a significant difference. Hence, the change is getting parked
in a branch.
(Leaf
check-in: 3ad687b7 user: drh tags: open-only-once)

In the command-line shell for CSV import, if the lines are \r\n terminated
and the last field is blank, make sure an empty string and not a "\r" string
is imported.
(check-in: 9c2e7612 user: drh tags: trunk)

Improved handling of constants and especially constant functions in the
ORDER BY clause of a query. Do not optimize out "ORDER BY random()".
Fix for ticket [65bdeb9739605cc2296].
(check-in: dca1945a user: drh tags: trunk)

Make sure temporary registers used within a co-routine are not also used
outside of that co-routine, in order to prevent concurrent use of the same
register for two different things. Ticket [8c63ff0eca81a9132d8](Closed-Leaf
check-in: cc5eda54 user: drh tags: tkt-8c63ff0eca)

In memsys5, initialize new allocations to non-zero bytes. Change the content
of freed allocations to prevent use after free. These changes in SQLITE_DEBUG
only.
(check-in: ba5f0a55 user: drh tags: trunk)

Add the SQLITE_NOTNULL P5 code for comparison operations - really a composite
of SQLITE_NULLEQ and SQLITE_JUMPIFNULL. This flag indicates that NULL operands
are not possible and raises and assert() if NULL operands are seen.
Also omit an unnecessary scan of the sqlite_sequence table when writing
into an AUTOINCREMENT table.
(check-in: d2c047f3 user: drh tags: trunk)

Improvements to "NOT IN (SELECT ...)" processing. Only test for NULL values
on the RHS on the first iteration, then remember the result. There has been
logic to do this for year, but it didn't work right and ended up repeating
the NULL test on every iteration. This inefficiency was found using the
VDBE coverage testing tools.
(check-in: 915f6f1c user: drh tags: trunk)

Merge in performance enhancements for INSERT operations, especially INSERTs
on tables that have no affinity columns or that have many indices or INSERTs
with content coming from a SELECT. Add the SQLITE_TESTCTRL_VDBE_COVERAGE
test control and the SQLITE_VDBE_COVERAGE compile-time option used for measure
coverage of branches in VDBE programs.
(check-in: a7268769 user: drh tags: trunk)

Avoid unnecessary calls to applyAffinity() during INSERT and UPDATE
operations, especially for table that have indices and tables for which
all columns have affinity "NONE".
(check-in: 35b4d6e9 user: drh tags: insert-optimization)

Enhance the code generator for INSERT INTO ... SELECT so that the SELECT
generates output directly in the registers that INSERT INTO will be using,
in many cases, and OP_SCopy operations can thus be avoided.
(check-in: aa2d8b0e user: drh tags: insert-optimization)

Add OP_IdxGT and OP_IdxLE as distinct opcodes. Formerly these operations where
done using OP_IdxGE and OP_IdxLT with the P5 flag set. But VDBE code is easier
to read with distinct opcode names. Also change OP_SeekGe to OP_SeekGE, and
so forth, so that the capitalization is consistent. The whole point of this
change is to improve the readability of VDBE listings.
(check-in: b6bea903 user: drh tags: trunk)

Ensure that if the "psow=0" URI option or FCNTL_POWERSAFE_OVERWRITE file-control is used to clear the power-safe overwrite flag, extra padding frames are added to the WAL file.
(check-in: 48c821fd user: dan tags: trunk)

Remove the "rowid cache" that sought to remember the largest rowid for a
table and thereby speed up OP_NewRowid. That cache was ineffective.
Removing it results in a performance increase of 0.4%, less memory usage,
and a slightly smaller library size.
(check-in: 56bc5ce8 user: drh tags: trunk)

Updates to the command-line shell. Simplify the banner message. Add the
".save" command as an alias for ".backup". When starting with no arguments,
include a banner message warning that the database is transient and in-memory
and mention the ".open" command.
(check-in: f5ad1e1b user: drh tags: trunk)

Make sure that virtual WHERE-clause terms do not get transformed into real
terms when processing set of OR-connected terms.
Fix for ticket [4c86b126f22ad].
(check-in: de635e09 user: drh tags: branch-3.8.3)

Add the ".save" command as an alias for ".backup". Improvements to the
way font changes are implemented on the in-memory database warning.
(Closed-Leaf
check-in: fe284afe user: drh tags: memdb-warning)

Fix the compound-select-to-subquery converter so that it works with the
new compound-select object linkage introduced as part of the fix
for ticket [31a19d11b97088296].
(check-in: 572d4be4 user: drh tags: trunk)

Do away with the "multi-register pseudo-table" abstration. Instead, just
use an OP_SCopy to load results directory from the result registers of
the co-routine.
(check-in: 1e64dd78 user: drh tags: trunk)

Change the OP_Trace opcode to OP_Init and give it the ability to jump to the
initialization code at the bottom of the program, thus avoiding the need for
an extra OP_Goto.
(check-in: 192dea97 user: drh tags: trunk)

Add the OP_Undef and OP_IsUndef opcodes. With these, use the first register
in the result register range as the flag to indicate EOF on an INSERT from
a SELECT, rather than allocating a separate boolean register for that task.
(check-in: 6fb74485 user: drh tags: coroutine-refactor)