]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
10 years agoChange the name of the _texte64() interfaces to just _test64(), without the "e". 64-bit-lengths
drh [Tue, 9 Sep 2014 20:30:24 +0000 (20:30 +0000)] 
Change the name of the _texte64() interfaces to just _test64(), without the "e".

FossilOrigin-Name: 6ab76c5fedfe568b0f0f34a600f9135bf6558148

10 years agoAdd new interfaces to the loadable extension mechanism.
drh [Tue, 9 Sep 2014 18:41:32 +0000 (18:41 +0000)] 
Add new interfaces to the loadable extension mechanism.

FossilOrigin-Name: 18d80cbc590165913d82056aa69ddaeea07b76ec

10 years agoAdd new APIs that take 64-bit length parameters:
drh [Tue, 9 Sep 2014 17:27:35 +0000 (17:27 +0000)] 
Add new APIs that take 64-bit length parameters:
sqlite3_malloc64(),
sqlite3_realloc64(),
sqlite3_bind_blob64(),
sqlite3_bind_texte64(),
sqlite3_result_blob64(),
and sqlite3_result_texte64().
Internal memory allocation routines also now use 64-bit unsigned length
parameters for safety.
Also add the sqlite3_msize() interface.
Fix the sqlite3_get_table() to use sqlite3_realloc64() to avoid a
integer overflow problem.

FossilOrigin-Name: 94954850cf2e1ec0b7f590c7f46cdc54c72558ce

10 years agoFixes to os_unix.c to support database (and other) files larger than 2GiB on Android.
dan [Sat, 6 Sep 2014 17:06:13 +0000 (17:06 +0000)] 
Fixes to os_unix.c to support database (and other) files larger than 2GiB on Android.

FossilOrigin-Name: ad7063aa1a0db32cdbe71815545b2edca57d3bcc

10 years agoMerge latest trunk changes with this branch. android-large-filles
dan [Sat, 6 Sep 2014 16:52:18 +0000 (16:52 +0000)] 
Merge latest trunk changes with this branch.

FossilOrigin-Name: 9dca7ce55797b3eb617859f6189c1a2ec6f66566

10 years agoFixes to os_unix.c to support database (and other) files larger than 2GiB.
dan [Sat, 6 Sep 2014 16:49:40 +0000 (16:49 +0000)] 
Fixes to os_unix.c to support database (and other) files larger than 2GiB.

FossilOrigin-Name: e7fae33c0754488336ce093189a83dfe1b818d89

10 years agoFix typos in comments. No code changes.
peter.d.reid [Sat, 6 Sep 2014 16:39:46 +0000 (16:39 +0000)] 
Fix typos in comments. No code changes.

FossilOrigin-Name: e62aab5e9290503869e1f4d5e0fefd2b4dee0a69

10 years agoDo not require a page-size change if the attempt to change the page size
drh [Sat, 6 Sep 2014 03:38:51 +0000 (03:38 +0000)] 
Do not require a page-size change if the attempt to change the page size
failed due to an OOM error.

FossilOrigin-Name: 4d4fb197dc438a486cf5d967cf435f1132902c63

10 years agoAdd the sqlite3_memdebug_title_count global variable, used during debugging
drh [Sat, 6 Sep 2014 03:16:28 +0000 (03:16 +0000)] 
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.

FossilOrigin-Name: 27e3ca3e0f1da54e3527704a8601bb9003b086bf

10 years agoFix a couple of typos in comments. No changes to code.
mistachkin [Sat, 6 Sep 2014 02:00:41 +0000 (02:00 +0000)] 
Fix a couple of typos in comments.  No changes to code.

FossilOrigin-Name: a758465e3cfa7e0cb8749d097cd6fb5f86b60955

10 years agoQuery planner heuristic update:
drh [Sat, 6 Sep 2014 01:35:57 +0000 (01:35 +0000)] 
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.

FossilOrigin-Name: 73954f93c4c6f880c6e01d0d130e3fed40fd4106

10 years agoFix harmless compiler warning.
mistachkin [Fri, 5 Sep 2014 05:58:37 +0000 (05:58 +0000)] 
Fix harmless compiler warning.

FossilOrigin-Name: 733119067757814609a9cea6b975818607bee4e3

10 years agoUpdate comments in the ANALYZE command that describe how the Stat4Accum
drh [Mon, 1 Sep 2014 23:06:44 +0000 (23:06 +0000)] 
Update comments in the ANALYZE command that describe how the Stat4Accum
objecct is passed around within the VDBE.  No changes to functional code.

FossilOrigin-Name: 9779c7a9eb1e2bd36e9286331a9314f064014d80

10 years agoAvoid a confusing (though correct) argument to the sqlite3_result_blob()
drh [Mon, 1 Sep 2014 22:34:54 +0000 (22:34 +0000)] 
Avoid a confusing (though correct) argument to the sqlite3_result_blob()
function in the implementation of ANALYZE.

FossilOrigin-Name: 4cae93f8ae8fb3fe38fd5dc7d3a5ea0d11552841

10 years agoFor sqlite3_win32_is_nt(), assume WinRT is NT-based and revise #ifdef ordering to...
mistachkin [Mon, 1 Sep 2014 19:29:19 +0000 (19:29 +0000)] 
For sqlite3_win32_is_nt(), assume WinRT is NT-based and revise #ifdef ordering to prefer the ANSI version of GetVersionEx, when available.

FossilOrigin-Name: be0a037244762cc0f5ff4a6d7822902f862767bd

10 years agoTweak the documentation for SQLITE_LIMIT_WORKER_THREADS. No changes to
drh [Mon, 1 Sep 2014 18:21:27 +0000 (18:21 +0000)] 
Tweak the documentation for SQLITE_LIMIT_WORKER_THREADS.  No changes to
executable code.

FossilOrigin-Name: 672e7387b1bda8d007da7de4244226577d7ab2dc

10 years agoAdd support for using separate worker threads to speed large sorts.
drh [Mon, 1 Sep 2014 17:36:46 +0000 (17:36 +0000)] 
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.

FossilOrigin-Name: b1c0f0bc1bd8a3477cd7a7ab510f0442ac88b517

10 years agoAttempt to make the xDelete method of the unix VFS more robust on VxWorks.
drh [Mon, 1 Sep 2014 13:37:55 +0000 (13:37 +0000)] 
Attempt to make the xDelete method of the unix VFS more robust on VxWorks.

FossilOrigin-Name: b0f6b91f36b503d8ba8d5257bb194f8c1afb4833

10 years agoMicro-optimizations in sqlite3BtreeNext() and sqlite3BtreePrevious().
drh [Mon, 1 Sep 2014 13:29:32 +0000 (13:29 +0000)] 
Micro-optimizations in sqlite3BtreeNext() and sqlite3BtreePrevious().

FossilOrigin-Name: 839c7996eecd5480152c514555b9aa1121a69ce0

10 years agoFix harmless compiler warnings for MSVC.
mistachkin [Mon, 1 Sep 2014 01:16:49 +0000 (01:16 +0000)] 
Fix harmless compiler warnings for MSVC.

FossilOrigin-Name: 3ef3246120d72dffe469733bb21667a548af0a44

10 years agoIn the command-line shell, added options --lookaside, --pagecache, and
drh [Sat, 30 Aug 2014 15:49:25 +0000 (15:49 +0000)] 
In the command-line shell, added options --lookaside, --pagecache, and
--scratch used to configure auxiliary memories.

FossilOrigin-Name: f61db04be4d7fb21b7f721647c37c45e283ffbea

10 years agoDisable worker threads when SQLITE_THREADSAFE=0. Set the default compile-time threads
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).

FossilOrigin-Name: 33fa0410499900dd8beb44b9a8ffbd9f4b68c8d8

10 years agoFix the speedtest1.c test program to set the worker thread count using
drh [Fri, 29 Aug 2014 18:06:33 +0000 (18:06 +0000)] 
Fix the speedtest1.c test program to set the worker thread count using
the threads pragma.

FossilOrigin-Name: 2ab4b5adc60b52bf2d2b79968d226b8dd7d2ab3b

10 years agoAdd SQLITE_LIMIT_WORKER_THREADS for controlling the maximum number of
drh [Fri, 29 Aug 2014 16:20:47 +0000 (16:20 +0000)] 
Add SQLITE_LIMIT_WORKER_THREADS for controlling the maximum number of
worker threads.

FossilOrigin-Name: 1b598c68f32db635d1cea1373bedc434aa60cf08

10 years agoMerge recent performance enhancements from trunk onto the threads branch.
drh [Fri, 29 Aug 2014 14:40:07 +0000 (14:40 +0000)] 
Merge recent performance enhancements from trunk onto the threads branch.

FossilOrigin-Name: 35c44a3c73e2e8b14ff194c41986f4bdb9dfe737

10 years agoNote a fault after all, rather a testing mistake.
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.

FossilOrigin-Name: 2a74129a21f9745f1363f844807e2d10201a3f40

10 years agoAvoid an unnecessary OP_Move operation for expression subqueries.
drh [Fri, 29 Aug 2014 12:29:39 +0000 (12:29 +0000)] 
Avoid an unnecessary OP_Move operation for expression subqueries.

FossilOrigin-Name: 462f42af52f146fd328ddcbbe78c8444ef7bd2c3

10 years agoImproved WHERETRACE messages for the estimated output row reductions from
drh [Thu, 28 Aug 2014 19:38:22 +0000 (19:38 +0000)] 
Improved WHERETRACE messages for the estimated output row reductions from
range scans.

FossilOrigin-Name: fdd478bb11eb9e244a7a1fb628ac27c53830fb24

10 years agoFix a problem causing an inaccurate stat4-based estimate for the
drh [Thu, 28 Aug 2014 17:30:28 +0000 (17:30 +0000)] 
Fix a problem causing an inaccurate stat4-based estimate for the
number of rows visited by a range scan.

FossilOrigin-Name: a9daf3ac444b896013f4054051937d49a597624a

10 years agoAdd a testcase() macro to help verfity the row estimation logic. stat4-experimental
drh [Thu, 28 Aug 2014 17:20:37 +0000 (17:20 +0000)] 
Add a testcase() macro to help verfity the row estimation logic.

FossilOrigin-Name: 6ba609522ea7325341fad93bdb5f869c6506dea4

10 years agoFix a problem causing an inaccurate stat4-based estimate for the number of rows visit...
dan [Thu, 28 Aug 2014 16:01:31 +0000 (16:01 +0000)] 
Fix a problem causing an inaccurate stat4-based estimate for the number of rows visited by a range scan.

FossilOrigin-Name: 052d89b554a947b7e420b7feb6650f5069b7cefa

10 years agoFix a formatting error ("%d" needed in place of "%g") on a WHERETRACE
drh [Thu, 28 Aug 2014 13:42:13 +0000 (13:42 +0000)] 
Fix a formatting error ("%d" needed in place of "%g") on a WHERETRACE
macro inside of the query planner.  This fix applies to debugging logic
only.

FossilOrigin-Name: c931ca2b7763cf894ece26ca4775d638876107e9

10 years agoRefactor the sqlite3PcacheFetch() routine into three separate routines,
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.

FossilOrigin-Name: bdb6e4978d1a26d5f795262172605184264ede9c

10 years agoAdd a VDBE synopsis comment for clarification.
mistachkin [Wed, 27 Aug 2014 17:53:40 +0000 (17:53 +0000)] 
Add a VDBE synopsis comment for clarification.

FossilOrigin-Name: 029a6dc744c24e7be482298c678af8a115d6a87b

10 years agoAdd a missing ticket number to a comment in index7.test.
dan [Wed, 27 Aug 2014 17:48:15 +0000 (17:48 +0000)] 
Add a missing ticket number to a comment in index7.test.

FossilOrigin-Name: d8b1c4336145d436241863c3525530e24a24799b

10 years agoWhen determining whether or not a partial index is usable, do not assume that the...
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].

FossilOrigin-Name: fcebca166f15431764b82a8b267f11d28386e975

10 years agoIn the sqlite3_context object, keep a pointer to the result value rather
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.

FossilOrigin-Name: 6c1ee3e388eb110de815270467b1e50592c0ba6c

10 years agoFactor out the exception paths from sqlite3ValueToText() into a separate
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.

FossilOrigin-Name: 1624916c6e9bc5dbcfa146b316a99ac8fecb13a9

10 years agoPerformance enhancement in sqlite3VdbeMemNulTerminate().
drh [Wed, 27 Aug 2014 00:50:11 +0000 (00:50 +0000)] 
Performance enhancement in sqlite3VdbeMemNulTerminate().

FossilOrigin-Name: f94cacc393e895522b92c9717c53357afc918d60

10 years agoChange the page cache so that a new sqlite3_pcache object is allocated as
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.

FossilOrigin-Name: f1f94a971e031e784f8c30a6faf829df58709329

10 years agoRemove the SQLITE_CONFIG_WORKER_THREADS configuration parameter. The number
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.

FossilOrigin-Name: e3305d4b4efcbe06945ce7f6ec0f2e864244aaf9

10 years agoMerge the CAST operator enhancements from trunk.
drh [Mon, 25 Aug 2014 22:43:17 +0000 (22:43 +0000)] 
Merge the CAST operator enhancements from trunk.

FossilOrigin-Name: 6c8f86e4e08d5d57e21496277613e0f9dcc06514

10 years agoAdd an assert() and five testcase() macros to the OP_Cast opcode implementation
drh [Mon, 25 Aug 2014 22:37:19 +0000 (22:37 +0000)] 
Add an assert() and five testcase() macros to the OP_Cast opcode implementation
to help verify that it is fully tested.

FossilOrigin-Name: af364cce9da0961593ef876b646197f82df08ad5

10 years agoMinor changes to the CAST logic to make it more testable.
drh [Mon, 25 Aug 2014 21:11:01 +0000 (21:11 +0000)] 
Minor changes to the CAST logic to make it more testable.

FossilOrigin-Name: 1ad70ec550c004160d9c0c57e6c416812cdead5e

10 years agoTest cases added for using unary "+" and CAST operators on the RHS of range
drh [Mon, 25 Aug 2014 20:21:07 +0000 (20:21 +0000)] 
Test cases added for using unary "+" and CAST operators on the RHS of range
constraints and verifying that STAT3/4 can use those constraints.

FossilOrigin-Name: 42505e5a810832442699ca54a46637c50e7f9e71

10 years agoAllow CAST expressions and unary "+" operators to be used in the DEFAULT
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.

FossilOrigin-Name: 91d8a8d0b792ea5c4fe68fd9caaf3345eddea486

10 years agoIn cases where stat4 data is available but cannot be used because the rhs of a range...
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.

FossilOrigin-Name: e06dc6f0c35f87c44292c71677111b74f073a5c4

10 years agoQuery or change the maximum number of worker threads allowed on each
drh [Mon, 25 Aug 2014 15:13:22 +0000 (15:13 +0000)] 
Query or change the maximum number of worker threads allowed on each
database connection separately using the "PRAGMA threads" command.

FossilOrigin-Name: 29c5e8a7c9d7ce349a1e1d72082d23450e877b45

10 years agoMerge the recent performance enhancements implemented on trunk into the
drh [Mon, 25 Aug 2014 13:27:02 +0000 (13:27 +0000)] 
Merge the recent performance enhancements implemented on trunk into the
threads branch.

FossilOrigin-Name: dfdc900f5d1a31ee5c5f35a630c4a8253e69093b

10 years agoRemove the pager_lookup() function since it is redundant with
drh [Mon, 25 Aug 2014 11:33:41 +0000 (11:33 +0000)] 
Remove the pager_lookup() function since it is redundant with
sqlite3PagerLookup().

FossilOrigin-Name: 54164ce47cfc3ad5dd8797114e4ba78811f23bef

10 years agoChange the name of the VdbeMemRelease() macro to VdbeMemReleaseExtern() to
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.

FossilOrigin-Name: 3ca5846da7da5e08192a4c96288197be3b7ab6f7

10 years agoThe sqlite3VdbeChangeEncoding() routine goes about 3x faster if the
drh [Sun, 24 Aug 2014 02:53:23 +0000 (02:53 +0000)] 
The sqlite3VdbeChangeEncoding() routine goes about 3x faster if the
sqlite3VdbeMemTranslate() subroutine is not inlined.

FossilOrigin-Name: 0c7e1b875a14ff9d71af7bb125a0272a23d57353

10 years agoPatch the sqlite3PagerWrite() method in the Pager to run a bit faster.
drh [Sun, 24 Aug 2014 01:32:43 +0000 (01:32 +0000)] 
Patch the sqlite3PagerWrite() method in the Pager to run a bit faster.

FossilOrigin-Name: c63311e2f3344363a5ed99838fb5850004eaee30

10 years agoFaster implementation of pcache1Fetch()
drh [Sat, 23 Aug 2014 23:15:31 +0000 (23:15 +0000)] 
Faster implementation of pcache1Fetch()

FossilOrigin-Name: 0371cc3bb07448bcd64fd671f3e71bb7f30deb4d

10 years agoFaster implementation of the sqlite3ApiExit() routine.
drh [Sat, 23 Aug 2014 20:25:53 +0000 (20:25 +0000)] 
Faster implementation of the sqlite3ApiExit() routine.

FossilOrigin-Name: bd41d394d48516eb7d8ddc46abdcb427aa80173e

10 years agoAnother memory allocator performance optimization.
drh [Sat, 23 Aug 2014 19:42:06 +0000 (19:42 +0000)] 
Another memory allocator performance optimization.

FossilOrigin-Name: 6da6f46d0c43e3b68c21f514ddf8ee663c20f249

10 years agoFix a variable-declaration after code problem in btree.c. Harmless in
drh [Sat, 23 Aug 2014 19:08:09 +0000 (19:08 +0000)] 
Fix a variable-declaration after code problem in btree.c.  Harmless in
GCC and CLANG but unacceptable for MSVC.

FossilOrigin-Name: 45abd5c0bad2847861f3b26a7040490aa9bb1332

10 years agoChanges to sqlite3ScratchMalloc() that make the entire memory allocation
drh [Sat, 23 Aug 2014 19:04:55 +0000 (19:04 +0000)] 
Changes to sqlite3ScratchMalloc() that make the entire memory allocation
interface a little faster and about 100 bytes smaller.

FossilOrigin-Name: f83daa16f65ef35062412e88c214852a4aeb3da2

10 years agoMake the implementation of the sqlite3_aggregate_context() interface faster
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.

FossilOrigin-Name: 802148f3110462eac939d53ce08eb9a2f6aac739

10 years agoImproved performance in the type handling of arithmetic operators in the VDBE.
drh [Sat, 23 Aug 2014 17:41:15 +0000 (17:41 +0000)] 
Improved performance in the type handling of arithmetic operators in the VDBE.

FossilOrigin-Name: 0c0a603950c97837442d82886f947aab0acbd805

10 years agoPerformance optimization in the applyAffinity() logic inside the VDBE.
drh [Sat, 23 Aug 2014 17:21:37 +0000 (17:21 +0000)] 
Performance optimization in the applyAffinity() logic inside the VDBE.

FossilOrigin-Name: 25f2246be404f38b4f8dd70397cd1454d46358c4

10 years agoAnother performance tweak: Split the sqlite3BtreeCursorHasMoved() routine
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.

FossilOrigin-Name: ce123b5c592556a8cd38b01fcc91ba76231d3098

10 years agoFactor the saveAllCursors() routine of btree.c into two separate routines,
drh [Fri, 22 Aug 2014 22:26:07 +0000 (22:26 +0000)] 
Factor the saveAllCursors() routine of btree.c into two separate routines,
for a noticable performance improvement.

FossilOrigin-Name: 3eb084390382c108e9b0ff0b29dede58ebb149bc

10 years agoPerformance enhancements in the b-tree mutex logic.
drh [Fri, 22 Aug 2014 21:58:10 +0000 (21:58 +0000)] 
Performance enhancements in the b-tree mutex logic.

FossilOrigin-Name: 8914530644f938a7a98e25ea1fb0bca1f9d79101

10 years agoCombine the pcacheAddToDirtyList() and pcacheRemoveFromDirtyList() routines
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.

FossilOrigin-Name: 6bcf1af6a48dbda5ac6f6b3b02810bdfc4730000

10 years agoRevise #ifdef ordering to prefer the ANSI version of GetVersionEx, when available. winrt
mistachkin [Fri, 22 Aug 2014 19:12:16 +0000 (19:12 +0000)] 
Revise #ifdef ordering to prefer the ANSI version of GetVersionEx, when available.

FossilOrigin-Name: 9fe0f0754c063c17fffa9d4814b7180397cf5226

10 years agoPerformance enhancement in sqlite3PutVarint().
drh [Fri, 22 Aug 2014 18:48:25 +0000 (18:48 +0000)] 
Performance enhancement in sqlite3PutVarint().

FossilOrigin-Name: a929be551924144c9bc7aab608404d59e479abb5

10 years agoSplit the sqlite3Error() routine into sqlite3Error() and
drh [Fri, 22 Aug 2014 18:00:11 +0000 (18:00 +0000)] 
Split the sqlite3Error() routine into sqlite3Error() and
sqlite3ErrorWithMsg(), for a slight size reduction and performance increase.

FossilOrigin-Name: cf561d1f0bb60b3d638632d20bd686dda4fa4a04

10 years agoPerformance improvement in the printf() logic by avoiding unnecessary stack
drh [Fri, 22 Aug 2014 15:40:20 +0000 (15:40 +0000)] 
Performance improvement in the printf() logic by avoiding unnecessary stack
pointer movement.

FossilOrigin-Name: f7f2160db014f0ae11ad13c8ad70ad3444124e3e

10 years agoImprove the performance and reduce the size of the sqlite3VdbeSerialGet()
drh [Fri, 22 Aug 2014 15:19:59 +0000 (15:19 +0000)] 
Improve the performance and reduce the size of the sqlite3VdbeSerialGet()
routine by avoiding the use of stack.

FossilOrigin-Name: ebc10e46c15017d7cd232b5f4f3ef67ef740d87f

10 years agoHandle the 4-byte integer case in the stackless routine.
drh [Fri, 22 Aug 2014 14:56:13 +0000 (14:56 +0000)] 
Handle the 4-byte integer case in the stackless routine.

FossilOrigin-Name: 3f55484e81000c75e231f5580632a68e782ded4f

10 years agoGet the sqlite3VdbeSerialGet() routine to run faster by avoiding the use
drh [Fri, 22 Aug 2014 14:34:05 +0000 (14:34 +0000)] 
Get the sqlite3VdbeSerialGet() routine to run faster by avoiding the use
of local variables.

FossilOrigin-Name: 8267d82174099e548a4f78d06af0c6324c89b83d

10 years agoChange a while-loop into a do-loop in sqlite3VdbeSerialPut() for a small
drh [Fri, 22 Aug 2014 13:22:32 +0000 (13:22 +0000)] 
Change a while-loop into a do-loop in sqlite3VdbeSerialPut() for a small
size reduction and performance improvement.

FossilOrigin-Name: 750bb0a0960606ab24037e0992e9f7a17524cc3e

10 years agoEnhance the spellfix extension with the ability to specify a rowid when
drh [Fri, 22 Aug 2014 11:11:30 +0000 (11:11 +0000)] 
Enhance the spellfix extension with the ability to specify a rowid when
inserting new rows.

FossilOrigin-Name: 369c480cda6fa66394b995346bbf51f3298446e1

10 years agoSimplify the interface to the symbol table, saving 600 bytes of code space.
drh [Thu, 21 Aug 2014 20:26:37 +0000 (20:26 +0000)] 
Simplify the interface to the symbol table, saving 600 bytes of code space.

FossilOrigin-Name: 14b0f561fe15622b61c6676c9c455dca6b9ba5f0

10 years agoFor sqlite3_win32_is_nt(), assume WinRT is NT-based.
mistachkin [Thu, 21 Aug 2014 19:11:17 +0000 (19:11 +0000)] 
For sqlite3_win32_is_nt(), assume WinRT is NT-based.

FossilOrigin-Name: 2f59e71fbf31d2bd788d11197943b2ff3f4046e1

10 years agoFix a faulty assert() statement. Add comments to clarify the behavior of
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].

FossilOrigin-Name: 7029b3404d3f5f698a496934f3a3f2972051b257

10 years agoIncrease the version number to 3.8.7
drh [Wed, 20 Aug 2014 23:42:50 +0000 (23:42 +0000)] 
Increase the version number to 3.8.7

FossilOrigin-Name: 91594aae0725388765070c80039dfe1bf126392d

10 years agoEnhancements to skip-scan such that it is operable when a middle column of
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.

FossilOrigin-Name: bc985caa7816f1f873ad8e4467c5278399f315ce

10 years agoA small performance improvement in freeSpace() by special-casing the
drh [Wed, 20 Aug 2014 18:43:44 +0000 (18:43 +0000)] 
A small performance improvement in freeSpace() by special-casing the
relatively common case of an empty freelist.

FossilOrigin-Name: 49f44d355ff70744e4951baca2481c7c2b6c02b3

10 years agoReimplement the freeSpace() routine in btree.c so that it runs faster.
drh [Wed, 20 Aug 2014 17:56:27 +0000 (17:56 +0000)] 
Reimplement the freeSpace() routine in btree.c so that it runs faster.

FossilOrigin-Name: fe4fd014b42b7b158ca968f1535b5636c67769f6

10 years agoRefactor local variable names in the freeSpace() routine of btree.c for
drh [Wed, 20 Aug 2014 14:37:09 +0000 (14:37 +0000)] 
Refactor local variable names in the freeSpace() routine of btree.c for
improved understandability.

FossilOrigin-Name: 7e63089a191f29aefde05e89bb612f3036cfa034

10 years agoSize reduction and performance improvements in btree.c and the
drh [Wed, 20 Aug 2014 13:35:45 +0000 (13:35 +0000)] 
Size reduction and performance improvements in btree.c and the
allocateSpace() routine.  Also fix an assert() in freeSpace().

FossilOrigin-Name: 121308fa869ad490a6924798d276c0ff32759acc

10 years agoAdd SQLITE_API macros in front of interface routines in the test_intarray.c
drh [Wed, 20 Aug 2014 13:25:06 +0000 (13:25 +0000)] 
Add SQLITE_API macros in front of interface routines in the test_intarray.c
extension.

FossilOrigin-Name: eea0661798e10018615854c871f24be0f8bb2ff9

10 years agoChange an assert() added by the previous commit into a testcase(). btree-speedup
drh [Wed, 20 Aug 2014 13:17:43 +0000 (13:17 +0000)] 
Change an assert() added by the previous commit into a testcase().
Fix a separate assert() in btree.c:freeSpace().

FossilOrigin-Name: fe51d3aa0ce7021213293a0647e31164073e78f7

10 years agoFurther size reduction and performance improvement in btree.c:allocateSpace().
drh [Wed, 20 Aug 2014 11:56:14 +0000 (11:56 +0000)] 
Further size reduction and performance improvement in btree.c:allocateSpace().

FossilOrigin-Name: 1cb1cd64930a6bc371143f7d2e77eb1c51498cb0

10 years agoFix a typo in the showdb usage message.
dan [Wed, 20 Aug 2014 10:42:16 +0000 (10:42 +0000)] 
Fix a typo in the showdb usage message.

FossilOrigin-Name: 6c66beae97ba1799c908d3a33371dedbc7f3f58c

10 years agoMinor performance improvement and size reduction for the btree-page space
drh [Wed, 20 Aug 2014 00:54:46 +0000 (00:54 +0000)] 
Minor performance improvement and size reduction for the btree-page space
allocator.

FossilOrigin-Name: 73637d12e31f5489efe37d8cf4ab50a1911d4c75

10 years agoModify the memsubsys1-3.1.4 test so that it does not fail arbitrarily due
drh [Tue, 19 Aug 2014 23:04:49 +0000 (23:04 +0000)] 
Modify the memsubsys1-3.1.4 test so that it does not fail arbitrarily due
to variations in the behavior of system malloc().

FossilOrigin-Name: d280157da0b5275f3e3c875d2dcfb9998d374ac0

10 years agoA better fix for the sqlite3_trace() problem.
drh [Tue, 19 Aug 2014 20:41:36 +0000 (20:41 +0000)] 
A better fix for the sqlite3_trace() problem.
Ticket [11d5aa455e0d98f3c1e6a]

FossilOrigin-Name: 44d5bd4cc3f76e9a151ba0abae1092bd184af264

10 years agoMake sure the sqlite3_trace() callback is invoked, even if the prepared
drh [Tue, 19 Aug 2014 20:27:40 +0000 (20:27 +0000)] 
Make sure the sqlite3_trace() callback is invoked, even if the prepared
statement was marked "expired" before it ever entered sqlite3_step().
Ticket [11d5aa455e0d98f3c1e6a08].

FossilOrigin-Name: 0d4d3df4bc5e75ce1543b5539a1e9e279d2a062f

10 years agoImprovements to output formatting with the ".trace" command in the
drh [Tue, 19 Aug 2014 19:28:00 +0000 (19:28 +0000)] 
Improvements to output formatting with the ".trace" command in the
command-line shell.

FossilOrigin-Name: d09d63c07748839e9b778a769b183bdd614c6c13

10 years agoMinor changes to do with the Tcl tea extension package autoconf system.
dan [Tue, 19 Aug 2014 09:15:41 +0000 (09:15 +0000)] 
Minor changes to do with the Tcl tea extension package autoconf system.

FossilOrigin-Name: f10a6111262ce6ee6984c64fa0e0023642eca27d

10 years agoRefactor the names of state objects in the command-line shell implementation..
drh [Mon, 18 Aug 2014 13:45:42 +0000 (13:45 +0000)] 
Refactor the names of state objects in the command-line shell implementation..

FossilOrigin-Name: 11a70e1ae7f05d06e4e09c9d20db0444b8881584

10 years agoFix compiler warnings on WinCE.
drh [Fri, 15 Aug 2014 16:13:07 +0000 (16:13 +0000)] 
Fix compiler warnings on WinCE.

FossilOrigin-Name: 28a379fcd43389ad3249eff51a621d0bb7c81640

10 years agoMerge the 3.8.6 release into the threads branch.
drh [Fri, 15 Aug 2014 15:46:21 +0000 (15:46 +0000)] 
Merge the 3.8.6 release into the threads branch.

FossilOrigin-Name: 05807c4122505567ec64fb2d142077f48a0a10b1

10 years agoVersion 3.8.6 version-3.8.6
drh [Fri, 15 Aug 2014 11:46:33 +0000 (11:46 +0000)] 
Version 3.8.6

FossilOrigin-Name: 9491ba7d738528f168657adb43a198238abde19e

10 years agoFix an assert that can fail if the database file is corrupted.
dan [Thu, 14 Aug 2014 19:53:37 +0000 (19:53 +0000)] 
Fix an assert that can fail if the database file is corrupted.

FossilOrigin-Name: 3f45b8192dad7fb1f027cbaa694046e3c1b3e278

10 years agoFix compiler warnings on WinCE. winCeWarn
mistachkin [Thu, 14 Aug 2014 18:31:56 +0000 (18:31 +0000)] 
Fix compiler warnings on WinCE.

FossilOrigin-Name: cc910b8e0c45e7387024f3a729003e2fef08b198

10 years agoMerge the pre-3.8.6 changes into the threads branch.
drh [Thu, 14 Aug 2014 14:02:48 +0000 (14:02 +0000)] 
Merge the pre-3.8.6 changes into the threads branch.

FossilOrigin-Name: a608fd1d52606a009c3acc7f1d184b86a7df3c82