Suppress the potential schema error that occurs when a non-user-auth
SQLite library tries to parse the sqlite_user table definition in a
user-auth database.
Enhance the sqlite3_user_add() interface to initialize the user
authentication logic. Add test cases for the extra argument on the
end of the authorizer callback.
Move user authentication blocking from sqlite3_prepare() over to the
table lock generator, thus allowing SQL statements (like
"PRAGMA locking_mode") that do not touch database content to run
prior to authentication.
Add support for the extra parameter on the sqlite3_set_authorizer() callback
and support for failing an ATTACH with an authentication-required database
using bad credentials. The extension is now feature complete, but much
testing and bug-fixing remains.
Add the sqlite3_memdebug_title_count global variable, used during debugging
to count the number of invocations of test_memdebug_settitle. By examining
this variable in the debugger after a segfault, one can then set a breakpoint
on test_memdebug_settitle that will fire just before the problem.
Query planner heuristic update:
When doing a full table scan on a table that has an equality constraint on
an unindexed column, do not allow the estimated number of output rows to
be greater than half the total number of rows in the table.
Add support for using separate worker threads to speed large sorts.
The SQLITE_MAX_WORKER_THREADS and SQLITE_DEFAULT_WORKER_THREADS compile-time
options and the SQLITE_LIMIT_WORKER_THREADS argument to
sqlite3_limit() and the "PRAGMA threads=N" pragma are added.
drh [Fri, 29 Aug 2014 19:06:07 +0000 (19:06 +0000)]
Disable worker threads when SQLITE_THREADSAFE=0. Set the default compile-time
maximum number of worker threads to 8 and honor the
SQLITE_DEFAULT_WORKER_THREADS compile-time constant (which defaults to 0).
drh [Fri, 29 Aug 2014 14:20:46 +0000 (14:20 +0000)]
Note a fault after all, rather a testing mistake.
Move this change back to trunk.
Was: Avoid an unnecessary OP_Move operation for expression subqueries.
drh [Wed, 27 Aug 2014 23:18:01 +0000 (23:18 +0000)]
Refactor the sqlite3PcacheFetch() routine into three separate routines,
which are significantly faster overall and about 100 bytes smaller in
size as well.
dan [Wed, 27 Aug 2014 17:37:20 +0000 (17:37 +0000)]
When determining whether or not a partial index is usable, do not assume that the cursor number assigned to each table in the query is the same as its index in the FROM clause. Fix for ticket [98d973b8f5].
drh [Wed, 27 Aug 2014 14:14:06 +0000 (14:14 +0000)]
In the sqlite3_context object, keep a pointer to the result value rather
than storing the result value in the sqlite3_context object and using
memcpy() to move the value back into its register
after the function returns. This runs faster and saves over 500 bytes
of code space.
drh [Wed, 27 Aug 2014 03:28:50 +0000 (03:28 +0000)]
Factor out the exception paths from sqlite3ValueToText() into a separate
function so that the main routine is much faster for the common case of
no required type or encoding conversions.
drh [Tue, 26 Aug 2014 15:06:49 +0000 (15:06 +0000)]
Change the page cache so that a new sqlite3_pcache object is allocated as
soon as the page cache is opened, not delayed until the first fetch request.
This give a noticable performance boost. The interface between pager and
the page cache has changed slightly, which might break ZIPVFS.
drh [Mon, 25 Aug 2014 23:44:44 +0000 (23:44 +0000)]
Remove the SQLITE_CONFIG_WORKER_THREADS configuration parameter. The number
of worker threads in the sorter is now determined only by the
PRAGMA threads=N setting.
drh [Mon, 25 Aug 2014 20:11:52 +0000 (20:11 +0000)]
Allow CAST expressions and unary "+" operators to be used in the DEFAULT
argument of an ALTER TABLE ADD COLUMN and to be understand on the RHS of
range constraints interpreted by STAT3/4. This involves a rewrite of the
implementation of the CAST operator.
dan [Mon, 25 Aug 2014 18:29:38 +0000 (18:29 +0000)]
In cases where stat4 data is available but cannot be used because the rhs of a range constraint is too complex a expression, fall back to using the default estimates for number of rows scanned.
drh [Mon, 25 Aug 2014 11:20:27 +0000 (11:20 +0000)]
Change the name of the VdbeMemRelease() macro to VdbeMemReleaseExtern() to
more accurately reflect what it does. Performance enhancement to the
sqlite3VdbeMemRelease() function.
drh [Sat, 23 Aug 2014 18:17:19 +0000 (18:17 +0000)]
Make the implementation of the sqlite3_aggregate_context() interface faster
for second an subsequent invocations. This helps all aggregate functions to
perform better.
drh [Fri, 22 Aug 2014 23:33:03 +0000 (23:33 +0000)]
Another performance tweak: Split the sqlite3BtreeCursorHasMoved() routine
into two with the second routine named sqlite3BtreeCursorRestore(). The first
now only reports whether or not the cursor has moved and the second tries to
restore the cursor. This allows the sqlite3VdbeCursorMoveto() routine to be
refactored to avoid stack pointer movements, for a noticable performance gain.
drh [Fri, 22 Aug 2014 20:35:29 +0000 (20:35 +0000)]
Combine the pcacheAddToDirtyList() and pcacheRemoveFromDirtyList() routines
into a single pcacheManageDirtyList() routine. The resulting binary code is
slightly faster and a few bytes smaller.
drh [Thu, 21 Aug 2014 14:10:23 +0000 (14:10 +0000)]
Fix a faulty assert() statement. Add comments to clarify the behavior of
the sqlite3OpenTableAndIndices() routine in insert.c. Add test cases to
verify that the assert() statement is not firing inappropriately.
Ticket [369d57fb8e5ccdff06f1].
drh [Wed, 20 Aug 2014 23:38:07 +0000 (23:38 +0000)]
Enhancements to skip-scan such that it is operable when a middle column of
an index is skipped while the left-most column is constrained in the WHERE
clause.