Make sure the omit-noop-left-join optimization is not applied if columns
of the LEFT JOIN are used in the ORDER BY clause.
Ticket [be84e357c035]. Increase version number to 3.8.0.2.
drh [Thu, 29 Aug 2013 13:23:59 +0000 (13:23 +0000)]
Fix an off-by-one error that causes a quoted empty string at the end of
a CRNL-terminated line of CSV input to be misread by the shell.
Cherrypick of [b5617e4fdadc4c].
drh [Thu, 29 Aug 2013 13:21:52 +0000 (13:21 +0000)]
In the query optimizer, when converting BETWEEN and LIKE/GLOB expressions
into simpler forms for processing, be sure to transfer the LEFT JOIN markings.
Fix for ticket [bc878246eafe0f52c]. Cherrypick of [caab361ebe].
drh [Tue, 20 Aug 2013 03:13:51 +0000 (03:13 +0000)]
Performance optimizations in the VDBE and especially to the OP_Next and
related opcodes and in the sqlite3BtreeNext() and sqlite3BtreePrevious()
routines. This is a cherrypick of [6f99b54aedeb], [d2efea1682a7], and
[d78c5d89de4b].
dan [Mon, 19 Aug 2013 19:29:50 +0000 (19:29 +0000)]
Initialize a variable in fts3_write.c on the grounds that the argument required to show that it does not require initialization with is complicated. Add an assert() to where.c to silence a clang scan-build warning.
drh [Sat, 17 Aug 2013 15:42:29 +0000 (15:42 +0000)]
The fullfsync, checkpoint_fullfsync, and cache_spill pragmas apply to all
files of a database connection, including those opened by future ATTACH
statements.
drh [Thu, 15 Aug 2013 22:40:21 +0000 (22:40 +0000)]
Make sure that GROUP BY terms select input column names in preference to
output column names, in compliance with the SQL standard.
Ticket [1c69be2dafc28].
drh [Thu, 15 Aug 2013 20:24:27 +0000 (20:24 +0000)]
Bare identifiers in ORDER BY clauses bind more tightly to output column name,
but identifiers in expressions bind more tightly to input column names.
This is a compromise between SQL92 and SQL99 behavior and is what
PostgreSQL and MS-SQL do. Ticket [f617ea3125e9c].
drh [Wed, 7 Aug 2013 23:15:52 +0000 (23:15 +0000)]
If the SQLITE_ALLOW_URI_AUTHORITY compile-time option is set, then allow
non-localhost authorities on URI filenames and pass them through as a UNC
to the underlying VFS.
drh [Wed, 7 Aug 2013 14:18:45 +0000 (14:18 +0000)]
Add a guard #ifndef to test_intarray.h to prevent harm if it is #included
more than once. Add a comment on the closing #endif of the guards on
sqlite3.h and test_multiplex.h.
drh [Tue, 6 Aug 2013 18:35:31 +0000 (18:35 +0000)]
Adjust #ifdefs in test_autoext.c so that it compiles with
SQLITE_OMIT_LOAD_EXTENSION. Fix compiler warnings in two other
test modules. No changes to the core.
drh [Tue, 6 Aug 2013 07:45:08 +0000 (07:45 +0000)]
More than double the speed of the resolveP2Values() routine in vdbeaux.c by
moving from an extended if-else on every opcode to a switch. Opcodes are
reordered in mkopcodesh.awk to put the switched opcodes close together,
for additional performance and to reduce code footprint.
drh [Mon, 5 Aug 2013 19:11:29 +0000 (19:11 +0000)]
Factor all KeyInfo object allocations into a single function:
sqlite3KeyInfoAlloc(). Always allocate enough space so that
sqlite3VdbeRecordCompare() can avoid checking boundaries and hence
run faster.
drh [Mon, 5 Aug 2013 15:32:09 +0000 (15:32 +0000)]
Improve performance of sqlite3VdbeRecordCompare() by using an approximation
that might give false negatives and only running the more expensive exact
subexpression if the approximation fails.
drh [Thu, 1 Aug 2013 20:26:04 +0000 (20:26 +0000)]
Fix a potential buffer overread in sqlite3VdbeRecordCompare() when a
serial_type specifies a field that starts in bounds but is much too large
for the allocated buffer. Mostly harmless. The overread is unlikely to
go more than one or two bytes past the end of the buffer.
drh [Thu, 1 Aug 2013 19:17:39 +0000 (19:17 +0000)]
Make sure signed integer overflow does not cause a segfault while attempting
to read a corrupt database where the header size varint on a record is larger
than the maximum 32-bit signed integer.
drh [Thu, 1 Aug 2013 17:21:26 +0000 (17:21 +0000)]
An improved method for avoiding the use of the STAT3 samples to compute
the estimated number of outputs when the left-most index is equality
constrained. This check-in undoes the previous fix and applies a new one.
drh [Thu, 1 Aug 2013 16:52:50 +0000 (16:52 +0000)]
Avoid using left-most column STAT3 samples if the left-most column has an
equality constrain and there are inequality constraints on the second column.
drh [Thu, 1 Aug 2013 01:14:43 +0000 (01:14 +0000)]
Add the logic to keep partial indices up to date through DML statements and
when new partial indices are created. This new logic is untested except to
verify that it does not interfere with full indices.
Add logic to the query planner to only use partial indices if the WHERE clause
constrains the search to rows covered by the partial index. This is just
infrastructure. The key routine, sqlite3ExprImpliesExpr(), is currently a
no-op so that partial indices will never be used.
Resolve names in CREATE INDEX WHERE clauses and detect errors. Disallow
expressions that contain variables, subqueries, or functions.
The expression is still not used for anything, however.
still unused.
Here begins an experimental branch for exploring the idea of a partial index.
This check-in is able to parse a WHERE clause on a CREATE INDEX statement, but
does not actually do anythingn with that WHERE clause yet.
In main.mk, always recompile vdbe.o and parse.o first, since changes to either
parse.y or vdbe.c will cause all files to be recompiled and if there are
syntax errors in vdbe.c or parse.y we want to hit them early in the compile
process.
Enhance the progress handler so that it keeps track of the number of VDBE
cycles across sqlite3_step() calls and issues callbacks when the cumulative
instruction count reaches threshold.