drh [Fri, 28 Feb 2014 20:47:24 +0000 (20:47 +0000)]
In the command-line shell add the (undocumented and unsupported) ".eqp"
command and -eqp command-line option, to cause EXPLAIN QUERY PLAN to be
run on each SQL statement as it is evaluated. Intended use is for analysis
of the query planner.
drh [Thu, 27 Feb 2014 15:04:13 +0000 (15:04 +0000)]
Add #defines to the command-line shell source code (shell.c) so that it
can be imported directly into other projects (ex: Fossil) and used without
editing.
drh [Wed, 26 Feb 2014 13:53:34 +0000 (13:53 +0000)]
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.
drh [Wed, 26 Feb 2014 02:26:09 +0000 (02:26 +0000)]
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].
drh [Mon, 24 Feb 2014 19:07:51 +0000 (19:07 +0000)]
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.
drh [Wed, 19 Feb 2014 19:14:34 +0000 (19:14 +0000)]
Add the VdbeCoverageNeverTaken() macro, and comments that better describe how
the VDBE branch coverage measurement works. Add some tags to provide 100%
VDBE branch coverage.
drh [Wed, 19 Feb 2014 14:20:49 +0000 (14:20 +0000)]
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.
drh [Tue, 18 Feb 2014 01:07:38 +0000 (01:07 +0000)]
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.
drh [Mon, 17 Feb 2014 23:52:13 +0000 (23:52 +0000)]
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.
drh [Mon, 17 Feb 2014 14:59:22 +0000 (14:59 +0000)]
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".
drh [Sun, 16 Feb 2014 01:55:49 +0000 (01:55 +0000)]
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.
drh [Fri, 14 Feb 2014 15:13:36 +0000 (15:13 +0000)]
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.
dan [Thu, 13 Feb 2014 19:27:08 +0000 (19:27 +0000)]
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.
drh [Wed, 12 Feb 2014 21:31:12 +0000 (21:31 +0000)]
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.
drh [Tue, 11 Feb 2014 16:22:18 +0000 (16:22 +0000)]
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.
drh [Tue, 11 Feb 2014 01:50:29 +0000 (01:50 +0000)]
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].
drh [Mon, 10 Feb 2014 18:56:05 +0000 (18:56 +0000)]
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].
drh [Sat, 8 Feb 2014 23:20:32 +0000 (23:20 +0000)]
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.
drh [Sat, 8 Feb 2014 01:40:27 +0000 (01:40 +0000)]
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.
drh [Fri, 7 Feb 2014 22:21:07 +0000 (22:21 +0000)]
Add opcodes OP_InitCoroutine and OP_EndCoroutine. Use these to remove the
need for separate boolean registers to record when a co-routine has finished.
drh [Fri, 7 Feb 2014 13:20:31 +0000 (13:20 +0000)]
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.
drh [Tue, 4 Feb 2014 23:45:45 +0000 (23:45 +0000)]
Do not mark the ephemeral tables used to hold the RHS of IN clauses as
unordered because the NGQP will use those ephemeral tables to help order the
output. This is not an issue for standard SQLite since ephemeral tables
there are always ordered, regardless of the hint. It only affects systems
that substitute an alternative storage engine.
drh [Thu, 30 Jan 2014 14:10:00 +0000 (14:10 +0000)]
Update a requirement mark and add some additional test cases to cover
the requirement associated with ORDER BY and LIMIT on compound SELECT
statements.