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.
Documentation changes to warn that sqlite3_set_auxdata() might call the
destructor even before it returns. Also fix the regexp extension to deal
with that case. Ticket [406d3b2ef91c].
Change the description of how sqlite3_progress_handler() works so that
the N parameter is "approximate". This aligns with the current implementation.
This is a documentation change only. No changes to code.
Add the "defer_foreign_keys" pragma and the SQLITE_DBSTATUS_DEFERRED_FKS
value for sqlite3_db_status(). This is a cherry-pick of a sequence of five
checkins in the sessions branch between [1d44e5d3c2] and [d39e65fe70].
Run progress callback checks less frequently in the main VDBE evaluation
loop. This makes up for the extra CPU cycles used to increment the cycle
counter for SQLITE_STMTSTATUS_VM_STEP.
Fix an adverse interaction between the IS NOT NULL optimization (available
only with SQLITE_ENABLE_STAT3) and the transitive constraint processing.
Fix for ticket [d805526eae253]
dan [Sat, 6 Jul 2013 17:57:39 +0000 (17:57 +0000)]
Drop any existing mapping of the database file when exiting the pager "error state", as it may at this point be too large for the database file. Do not invoke file-control MMAP_LIMIT if the database file handle does not support xFetch and xUnfetch (on the grounds that xUnfetch(0) calls to invalidate the mapping cannot be made).
drh [Sat, 29 Jun 2013 15:40:22 +0000 (15:40 +0000)]
Fix the build of the command-line shell on windows. Windows uses "_pclose"
rather than "pclose" as the pointer to the function that closes a popen pipe.
drh [Fri, 28 Jun 2013 21:12:20 +0000 (21:12 +0000)]
Add the SQLITE_DEFAULT_AUTOMATIC_INDEX compile-time option, which if set to
zero turns automatic indices off by default. Increase the estimated cost
of an automatic index. Additional minor refactoring of the automatic
index code.
dan [Fri, 28 Jun 2013 19:41:43 +0000 (19:41 +0000)]
Allow read transactions to be freely opened and closed by SQL statements run from within the implementation of user-functions if the user-function is called by a SELECT statement that does not access any database tables (e.g. "SELECT user_function();").