]> git.ipfire.org Git - thirdparty/sqlite.git/log
thirdparty/sqlite.git
12 years agoFix harmless compiler warnings.
drh [Fri, 18 Apr 2014 13:40:07 +0000 (13:40 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: f8f72ecb9052a4cace1db75879fb8b5131ea4f50

12 years agoMerge recent trunk changes into the threads branch.
drh [Fri, 18 Apr 2014 12:38:54 +0000 (12:38 +0000)] 
Merge recent trunk changes into the threads branch.

FossilOrigin-Name: 8729aa3e3ed1da2e15408ef8705cbe185cd2a5ac

12 years agoFurther improvements to the RTREE_DECODE_COORD() method, to take advantage
drh [Fri, 18 Apr 2014 01:37:08 +0000 (01:37 +0000)] 
Further improvements to the RTREE_DECODE_COORD() method, to take advantage
of known processor byte orders when available.  This makes the code 3% faster,
according to valgrind.  Also add test cases to make sure the on-disk
representation is correct.

FossilOrigin-Name: 6f3e94f4b1b403cd7bfc5e8e0ffbd61b5174d3a4

12 years agoMerge the latest changes from sessions.
drh [Fri, 18 Apr 2014 01:14:46 +0000 (01:14 +0000)] 
Merge the latest changes from sessions.

FossilOrigin-Name: d9eef5b03c7c4bb69c11eda41152ee81aed1cac7

12 years agoMerge recent trunk changes into sessions.
drh [Fri, 18 Apr 2014 01:10:05 +0000 (01:10 +0000)] 
Merge recent trunk changes into sessions.

FossilOrigin-Name: 95e77efe076ab421bd246119c47dba5dacf9d087

12 years agoAdd the SQLITE_RUNTIME_BYTEORDER compile-time option to force SQLite to check
drh [Fri, 18 Apr 2014 00:49:29 +0000 (00:49 +0000)] 
Add the SQLITE_RUNTIME_BYTEORDER compile-time option to force SQLite to check
the processor byte-order at run-time.  Add additional compile-time byte order
checks for ARM, PPC, and SPARC.

FossilOrigin-Name: 2c5363873a6f990a0abaacac6303acd46b48befc

12 years agoPreliminary changes to support building VSIX packages for Windows Phone 8.1.
mistachkin [Fri, 18 Apr 2014 00:08:13 +0000 (00:08 +0000)] 
Preliminary changes to support building VSIX packages for Windows Phone 8.1.

FossilOrigin-Name: a1b2f28ba85b043df68875f5d3446140db4f2cb0

12 years agoAdd the SQLITE_TESTCTRL_BYTEORDER test control to interrogate SQLite's notion
drh [Fri, 18 Apr 2014 00:06:02 +0000 (00:06 +0000)] 
Add the SQLITE_TESTCTRL_BYTEORDER test control to interrogate SQLite's notion
of the processor byte order and whether the byte order is known at compile-time
or determined at run-time.

FossilOrigin-Name: 9c6961967ae00e563ebe2859eaf2639a79f2cb01

12 years agoPerformance optimization on byte-swapping in R-Tree.
drh [Thu, 17 Apr 2014 23:23:29 +0000 (23:23 +0000)] 
Performance optimization on byte-swapping in R-Tree.

FossilOrigin-Name: 444084fd620fc3f45cfb87b83f532d76bd2744e7

12 years agoMore test cases with very long priority queues.
drh [Thu, 17 Apr 2014 15:34:58 +0000 (15:34 +0000)] 
More test cases with very long priority queues.

FossilOrigin-Name: 71692aa97c78676f0ba80eaeec0ad9ac225f4427

12 years agoTest cases and bug fixes for the sqlite3_rtree_query_callback()
drh [Thu, 17 Apr 2014 14:52:20 +0000 (14:52 +0000)] 
Test cases and bug fixes for the sqlite3_rtree_query_callback()
mechanism.

FossilOrigin-Name: 1ccaaed6b516ec2ce953c1b31025a82ba76d00e7

12 years agoRefactor the constraint checking logic in RTree. The new-style constraint
drh [Thu, 17 Apr 2014 13:15:33 +0000 (13:15 +0000)] 
Refactor the constraint checking logic in RTree.  The new-style constraint
callbacks created by sqlite3_rtree_query_callback() are now hooked up from
end to end, though still untested.

FossilOrigin-Name: 32a13870175a1dd1d33af3572dde09ff607a04b6

12 years agoFix build problems in vdbesort.c. Add further comments and changes to make things...
dan [Thu, 17 Apr 2014 08:57:17 +0000 (08:57 +0000)] 
Fix build problems in vdbesort.c. Add further comments and changes to make things easier to understand.

FossilOrigin-Name: 12b190db1d20c34390c768614b40ff58a9d3b74c

12 years agoPerformance optimization on nodeGetCell() in R-Tree.
drh [Wed, 16 Apr 2014 21:02:28 +0000 (21:02 +0000)] 
Performance optimization on nodeGetCell() in R-Tree.

FossilOrigin-Name: 5d20ff9ec837ad35bc44d6c25d13764b350e81dd

12 years agoClarify the purpose of the nField argument passed to sqlite3VdbeSorterInit().
dan [Wed, 16 Apr 2014 19:04:23 +0000 (19:04 +0000)] 
Clarify the purpose of the nField argument passed to sqlite3VdbeSorterInit().

FossilOrigin-Name: c0c8cff17b7311bbc4fd081313a5552f927c3833

12 years agoChange the name of vdbeIncrInit2 to vdbePmaReaderIncrInit. Add a header comment to...
dan [Wed, 16 Apr 2014 17:41:22 +0000 (17:41 +0000)] 
Change the name of vdbeIncrInit2 to vdbePmaReaderIncrInit. Add a header comment to the same function.

FossilOrigin-Name: 6622d87675c1d7992b1e6d52ae7da1007a1568a4

12 years agoConvert the RTree module query mechanism over to using a priority queue for
drh [Wed, 16 Apr 2014 17:23:23 +0000 (17:23 +0000)] 
Convert the RTree module query mechanism over to using a priority queue for
walking the RTree.

FossilOrigin-Name: f26936f71a16ab25590540f7feb273514dfb69ff

12 years agoTCL tests now all pass. rtree-queue
drh [Wed, 16 Apr 2014 17:15:14 +0000 (17:15 +0000)] 
TCL tests now all pass.

FossilOrigin-Name: f864baccd3fe0ee939ac1ec20069792f649cddc0

12 years agoRework the way trees of MergeEngine objects are built in vdbesort.c to make it easier...
dan [Wed, 16 Apr 2014 16:43:05 +0000 (16:43 +0000)] 
Rework the way trees of MergeEngine objects are built in vdbesort.c to make it easier to follow. Fix memory leaks that could follow an OOM or IO error. Add various comments to explain functions in vdbesort.c.

FossilOrigin-Name: 69026ec7dc3bd3e33bbe17c221a53cf1dd0f8945

12 years agoFix a bug in rowid=? query handling. More problems remain.
drh [Wed, 16 Apr 2014 14:45:11 +0000 (14:45 +0000)] 
Fix a bug in rowid=? query handling.  More problems remain.

FossilOrigin-Name: 5b0e6ba4a5050cf81cf41b977b28d714163569e0

12 years agoBug fixes to the priority-queue implementation for R-Trees. Improved tracing
drh [Wed, 16 Apr 2014 13:00:08 +0000 (13:00 +0000)] 
Bug fixes to the priority-queue implementation for R-Trees.  Improved tracing
capability.  Some queries work now, but still many problems.

FossilOrigin-Name: a439ddd629c6bb5ea2e7e274673fee4f5c207acf

12 years agoInitial attempt at getting R-Tree queries to work using a priority queue.
drh [Tue, 15 Apr 2014 21:06:14 +0000 (21:06 +0000)] 
Initial attempt at getting R-Tree queries to work using a priority queue.
This check-in compiles, but R-Trees do not work well.  And there are
debugging printf()s left in the code.  This is an incremental check-in.

FossilOrigin-Name: 53688a25c23c394278a357829793889970aa4157

12 years agoFix some problems to do with OOM conditions in vdbesort.c. Some problems remain.
dan [Tue, 15 Apr 2014 20:52:27 +0000 (20:52 +0000)] 
Fix some problems to do with OOM conditions in vdbesort.c. Some problems remain.

FossilOrigin-Name: 2f94f9ce9bf11f1599bbc640b3fc8c15da588416

12 years agoFix further code and documentation issues in vdbesort.c.
dan [Tue, 15 Apr 2014 19:52:34 +0000 (19:52 +0000)] 
Fix further code and documentation issues in vdbesort.c.

FossilOrigin-Name: d03f5b8622d304f029f73c7cd0bee3182a81d081

12 years agoMake sure the undocumented sqlite_rename_parent() function does not
drh [Mon, 14 Apr 2014 19:48:25 +0000 (19:48 +0000)] 
Make sure the undocumented sqlite_rename_parent() function does not
crash even if it is invoked with NULL arguments.
Ticket [264b970c4379fd4b94]

FossilOrigin-Name: c6fa8d0d82805be230f672eabccdfa5680d4ddfd

12 years agoAllow the sorter to begin returning data to the VDBE as soon as it is available,...
dan [Mon, 14 Apr 2014 19:23:18 +0000 (19:23 +0000)] 
Allow the sorter to begin returning data to the VDBE as soon as it is available, instead of waiting until all keys have been sorted.

FossilOrigin-Name: cb0ab20c48962cdee03115efa93d7d501780ac73

12 years agoImprove performance in single-threaded mode by having the final merge pass keys direc... threads-experimental
dan [Mon, 14 Apr 2014 18:41:21 +0000 (18:41 +0000)] 
Improve performance in single-threaded mode by having the final merge pass keys directly to the VDBE, instead of going via a final PMA.

FossilOrigin-Name: 02610cd9b77caa2c181210056088beb3ad6ce30f

12 years agoFix comments on the rtreenode() and rtreedepth() test function in the R-Tree
drh [Mon, 14 Apr 2014 14:43:09 +0000 (14:43 +0000)] 
Fix comments on the rtreenode() and rtreedepth() test function in the R-Tree
module.

FossilOrigin-Name: ade5b986e8baab9df7bdaf7ccfaee2d6ba55fa3c

12 years agoRemove over 300 lines of unused code, code that implemented the older
drh [Mon, 14 Apr 2014 12:18:17 +0000 (12:18 +0000)] 
Remove over 300 lines of unused code, code that implemented the older
Guttman insertion algorithms that are no longer used.

FossilOrigin-Name: 3ba5f295c709faebf5505e61f6dc5266b811b086

12 years agoMinor fixes so that builds with SQLITE_MAX_WORKER_THREADS=0 work.
dan [Mon, 14 Apr 2014 08:45:32 +0000 (08:45 +0000)] 
Minor fixes so that builds with SQLITE_MAX_WORKER_THREADS=0 work.

FossilOrigin-Name: e400bbbf26cdfe88f6cb231e96cdcddb9a6bcc0f

12 years agoImprove use of multiple threads in sqlite3VdbeSorterRewind().
dan [Mon, 14 Apr 2014 07:30:39 +0000 (07:30 +0000)] 
Improve use of multiple threads in sqlite3VdbeSorterRewind().

FossilOrigin-Name: e1bdc4b810907cc0e55e0c923c8ebc777068cfe0

12 years agoRemove the unused second argument from sqlite3ExprCachePop(). Add an
drh [Sun, 13 Apr 2014 19:28:15 +0000 (19:28 +0000)] 
Remove the unused second argument from sqlite3ExprCachePop().  Add an
ALWAYS() on an always-true conditional in sqlite3VdbeResolveLabel().

FossilOrigin-Name: ab23abf392175d3e256ff619b13abbbe732a49ed

12 years agoMake sure column cache elements are cleared correctly when jumping over
drh [Sun, 13 Apr 2014 19:15:49 +0000 (19:15 +0000)] 
Make sure column cache elements are cleared correctly when jumping over
code for key generation in a partial index.
Fix for ticket [2ea3e9fe6379fc3f6].

FossilOrigin-Name: 3122b8364082be783821da01d4af2af6a9586327

12 years agoContinuing work on the new custom query mechanism for r-tree.
drh [Sun, 13 Apr 2014 16:10:09 +0000 (16:10 +0000)] 
Continuing work on the new custom query mechanism for r-tree.

FossilOrigin-Name: ca7357e66ca60f59477b1db000c2cdaeb8082ae1

12 years agoFix many issues with new code.
dan [Sat, 12 Apr 2014 19:34:44 +0000 (19:34 +0000)] 
Fix many issues with new code.

FossilOrigin-Name: 62c406a042d7246f6df6b943421182a88483b2e3

12 years agoContinuing clean-up of the R-Tree module in preparation for cutting in the
drh [Sat, 12 Apr 2014 17:44:00 +0000 (17:44 +0000)] 
Continuing clean-up of the R-Tree module in preparation for cutting in the
new generalized query mechanism.

FossilOrigin-Name: 66c858f20586424e15d0bfa3d7b56643bde66226

12 years agoAdd the new interfaces to rtree, though they do not yet work. Add the
drh [Fri, 11 Apr 2014 23:14:48 +0000 (23:14 +0000)] 
Add the new interfaces to rtree, though they do not yet work.  Add the
"show_speedtest1_rtree.tcl" script for showing the test data used for the
R-Tree tests of speedtest1.  Change speedtest1 to generate better R-Tree
test data.

FossilOrigin-Name: 0b70275972c7a6a533566c1e50bffbf3ac531e95

12 years agoAvoid having the sorter merge too many PMAs at a time when incrementally merging...
dan [Fri, 11 Apr 2014 19:43:07 +0000 (19:43 +0000)] 
Avoid having the sorter merge too many PMAs at a time when incrementally merging data following a SorterRewind().

FossilOrigin-Name: 98bf0307b121b0776a7170108cc8d3f948a7ebfe

12 years agoAdd the --verify option to speedtest1. Add verification test cases to
drh [Fri, 11 Apr 2014 17:41:08 +0000 (17:41 +0000)] 
Add the --verify option to speedtest1.  Add verification test cases to
the "rtree" testset and a case that uses a custom geometry callback.

FossilOrigin-Name: 9d485c4207a81f32334857d4a608c5c511dd2b83

12 years agoUpdate comments in the R-Tree module in preparation for some big changes.
drh [Fri, 11 Apr 2014 16:14:54 +0000 (16:14 +0000)] 
Update comments in the R-Tree module in preparation for some big changes.
Add an "rtree" performance test to speedtest1.

FossilOrigin-Name: 20a73ec0b2f56609a4504052e198e32803d30207

12 years agoModify the OR-clause handling so that it can safely deal with OR-clause
drh [Thu, 10 Apr 2014 02:24:48 +0000 (02:24 +0000)] 
Modify the OR-clause handling so that it can safely deal with OR-clause
with 17 or more terms.  Fix for ticket [10fb063b1179be53ea0b53bb].

FossilOrigin-Name: a67b5312f63909737c052fe58ab5772d45530d49

12 years agoExperimental multi-threaded sorting changes to allow the sorter to begin returning...
dan [Wed, 9 Apr 2014 20:04:17 +0000 (20:04 +0000)] 
Experimental multi-threaded sorting changes to allow the sorter to begin returning items to the VDBE before all data is sorted.

FossilOrigin-Name: f9d5e09afaf64d68a0e461c1c2f38179bcea4b1f

12 years agoFix harmless compiler warnings.
drh [Fri, 4 Apr 2014 22:44:59 +0000 (22:44 +0000)] 
Fix harmless compiler warnings.

FossilOrigin-Name: e54dded2012f0ab486ee138e9bd57c528af33980

12 years agoFix typo in a Windows threading support routine.
mistachkin [Fri, 4 Apr 2014 21:40:38 +0000 (21:40 +0000)] 
Fix typo in a Windows threading support routine.

FossilOrigin-Name: 5e3dfa27c71a666e122e3cf64897038ff8424800

12 years agoPerformance improvements when reading large blobs, especially if
drh [Fri, 4 Apr 2014 18:49:19 +0000 (18:49 +0000)] 
Performance improvements when reading large blobs, especially if
SQLITE_DIRECT_OVERFLOW_READ is defined.

FossilOrigin-Name: 2312eb6a9eb31051db4e0baf19e033ba39adc7b1

12 years agoMerge the latest trunk changes into the threads branch.
drh [Fri, 4 Apr 2014 18:37:36 +0000 (18:37 +0000)] 
Merge the latest trunk changes into the threads branch.

FossilOrigin-Name: 39ac79cffe716f88af0871bdd206231b6a6511ff

12 years agoMerge changes to the query planner that strive to ensure that any index
drh [Fri, 4 Apr 2014 18:20:35 +0000 (18:20 +0000)] 
Merge changes to the query planner that strive to ensure that any index
usage that is a proper subset of some other index usage always has a slightly
higher cost.

FossilOrigin-Name: 683dd379a293b2f330e1e4cd746f190527fe48ee

12 years agoEnsure the "PRAGMA journal_mode=WAL" works coming from any other journal_mode
drh [Fri, 4 Apr 2014 14:12:52 +0000 (14:12 +0000)] 
Ensure the "PRAGMA journal_mode=WAL" works coming from any other journal_mode
with ATTACH-ed databases.

FossilOrigin-Name: e54330b43127e46fc6494748cbb353a6fc91cfd7

12 years agoAdd test file sort3.test, which should have been part of commit [9d3351b8d7].
dan [Fri, 4 Apr 2014 07:52:44 +0000 (07:52 +0000)] 
Add test file sort3.test, which should have been part of commit [9d3351b8d7].

FossilOrigin-Name: dceed2c803fca23c83c02c448d5ae7c4698efee1

12 years agoChange vdbeSorterExtendFile() so that it makes a best effort to create the
drh [Fri, 4 Apr 2014 02:13:26 +0000 (02:13 +0000)] 
Change vdbeSorterExtendFile() so that it makes a best effort to create the
PMA file of the desired size, but does not return an error if unable.

FossilOrigin-Name: 217814bc4b53fab7bdad433e24e8aef8998c38fe

12 years agoMerge all recent changes from trunk.
drh [Thu, 3 Apr 2014 16:42:21 +0000 (16:42 +0000)] 
Merge all recent changes from trunk.

FossilOrigin-Name: a0910079adde95245680dee59b43613b60903f10

12 years agoMerge all recent changes from trunk,
drh [Thu, 3 Apr 2014 16:35:33 +0000 (16:35 +0000)] 
Merge all recent changes from trunk,
including the fix for the OP_SCopy-vs-OP_Copy problem.

FossilOrigin-Name: 9515c8344a6743bbb0c6a6e49fb79fb3139090df

12 years agoUse OP_Copy instead of OP_SCopy when moving results out of a subquery,
drh [Thu, 3 Apr 2014 16:29:31 +0000 (16:29 +0000)] 
Use OP_Copy instead of OP_SCopy when moving results out of a subquery,
to prevent the subquery results from changing out from under the outer
query.  Fix for ticket [1e64dd782a126f48d78].

FossilOrigin-Name: d5513dfa23baa0b0a095aaf17d19aacd30dcef61

12 years agoFix an integer overflow problem in the sorter.
dan [Thu, 3 Apr 2014 16:25:29 +0000 (16:25 +0000)] 
Fix an integer overflow problem in the sorter.

FossilOrigin-Name: 9d3351b8d713232133dad149c73fb2a27c72abb1

12 years agoFix a typo in the "Synopsis:" comment for the OP_VFilter opcode.
drh [Thu, 3 Apr 2014 14:31:00 +0000 (14:31 +0000)] 
Fix a typo in the "Synopsis:" comment for the OP_VFilter opcode.

FossilOrigin-Name: 48ecdd4aff03741f96c070dced69c3c273b652cb

12 years agoFix minor errors causing compilation to fail with SQLITE_MAX_WORKER_THREADS set to...
dan [Thu, 3 Apr 2014 14:29:08 +0000 (14:29 +0000)] 
Fix minor errors causing compilation to fail with SQLITE_MAX_WORKER_THREADS set to a value greater than zero.

FossilOrigin-Name: 0561272abf357a2f4709f6c02866e570d19cd344

12 years agoRefactor local object and method names in vdbesort.c so that their names
drh [Thu, 3 Apr 2014 02:54:27 +0000 (02:54 +0000)] 
Refactor local object and method names in vdbesort.c so that their names
more closely reflect their actual use.

FossilOrigin-Name: d284e30eb1db144965fa85566e4234e30464350b

12 years agoIn the command-line shell, run set writable_schema before running the
drh [Thu, 3 Apr 2014 00:32:13 +0000 (00:32 +0000)] 
In the command-line shell, run set writable_schema before running the
".clone" command.

FossilOrigin-Name: 9d2ae6342c8afa904bec591ebe134ff7f536b71c

12 years agoAdd a big introductory comment to vdbesort.c explaining its operation at a
drh [Wed, 2 Apr 2014 18:58:49 +0000 (18:58 +0000)] 
Add a big introductory comment to vdbesort.c explaining its operation at a
high level.  Also adjust some symbolic names and fix other comment issues in
that file.

FossilOrigin-Name: eef60f1bf54fcdc7b32f96ebb87a9a0bf0776e8b

12 years agoFix some problems with OOM handling in vdbesort.c.
dan [Wed, 2 Apr 2014 15:15:25 +0000 (15:15 +0000)] 
Fix some problems with OOM handling in vdbesort.c.

FossilOrigin-Name: 47e702bd8392bc50c4edaf6a2c8c499af87b520e

12 years agoChange the name of the SorterThread object to "SortSubtask" to avoid confusion
drh [Wed, 2 Apr 2014 14:38:14 +0000 (14:38 +0000)] 
Change the name of the SorterThread object to "SortSubtask" to avoid confusion
with the SQLiteThread object.

FossilOrigin-Name: 4ee2d910fbbed8d4def15e4e99ee225839f3a739

12 years agoWhen sorting data for a CREATE INDEX statement in single-threaded mode, assume that...
dan [Tue, 1 Apr 2014 18:41:51 +0000 (18:41 +0000)] 
When sorting data for a CREATE INDEX statement in single-threaded mode, assume that keys are delivered to the sorter in primary key order. Also fix various comments that had fallen out of date.

FossilOrigin-Name: 821d1ac4504243fa13b9e3c0d56361ad9fb80d78

12 years agoEven if compile time option SQLITE_MAX_WORKER_THREADS is set to one or greater, set...
dan [Tue, 1 Apr 2014 15:38:44 +0000 (15:38 +0000)] 
Even if compile time option SQLITE_MAX_WORKER_THREADS is set to one or greater, set the default number of worker threads to zero. Distribute data more evenly between threads in sqlite3VdbeSorterWrite() to improve performance when sorting large amounts of data. Add new test file sort2.test.

FossilOrigin-Name: 643c86a056168e39fcb7f39b8a72731f1eb246db

12 years agoFix a problem with OOM handling in the sorter code.
dan [Tue, 1 Apr 2014 10:19:02 +0000 (10:19 +0000)] 
Fix a problem with OOM handling in the sorter code.

FossilOrigin-Name: 59cd5229e2b5be5272cf57c7e7d09e97d16a5425

12 years agoRemove an unnecessary conditional, replacing it with an assert(). overflow-pgno-cache
drh [Tue, 1 Apr 2014 01:24:34 +0000 (01:24 +0000)] 
Remove an unnecessary conditional, replacing it with an assert().
Improvements to comments.

FossilOrigin-Name: 834bf1c367e1ccd498c7f9f843be2d2aa11ffb3c

12 years agoFix a compiler warning when SQLITE_DIRECT_OVERFLOW_READ is defined.
drh [Mon, 31 Mar 2014 23:57:41 +0000 (23:57 +0000)] 
Fix a compiler warning when SQLITE_DIRECT_OVERFLOW_READ is defined.
Minor performance enhancement and size reduction.

FossilOrigin-Name: 96385dc460545807a5c8fcf6280a971700f84866

12 years agoMerge in the latest changes and fixes from trunk.
drh [Mon, 31 Mar 2014 22:03:32 +0000 (22:03 +0000)] 
Merge in the latest changes and fixes from trunk.

FossilOrigin-Name: f6211540c9d66a08dc580dd733e4f4a98968ae30

12 years agoRemove an unnecessary conditional. query-plan-experiments
drh [Mon, 31 Mar 2014 20:05:20 +0000 (20:05 +0000)] 
Remove an unnecessary conditional.

FossilOrigin-Name: 7473c4dfc10a47594affa6f4e071a08dc8838c0c

12 years agoAdd the SQLITE_MAX_WORKER_THREADS compile time option. And the SQLITE_CONFIG_WORKER_T...
dan [Mon, 31 Mar 2014 19:57:34 +0000 (19:57 +0000)] 
Add the SQLITE_MAX_WORKER_THREADS compile time option. And the SQLITE_CONFIG_WORKER_THREADS sqlite3_config() switch.

FossilOrigin-Name: 2774710df8cd2bfaca49888c69f1b01c0ddadf9a

12 years agoAlso make sure an index that is a proper subset of some other index has a
drh [Mon, 31 Mar 2014 19:49:00 +0000 (19:49 +0000)] 
Also make sure an index that is a proper subset of some other index has a
higher cost than that other index.  Add test cases.

FossilOrigin-Name: b7830d232b073a197aa1092e78cb24e88cb10fd3

12 years agoMake sure that an index that covers a proper superset of the WHERE clause
drh [Mon, 31 Mar 2014 18:24:18 +0000 (18:24 +0000)] 
Make sure that an index that covers a proper superset of the WHERE clause
terms of some other index has a lower cost than the other index.

FossilOrigin-Name: ea8b0910040198751551b0b960e6b783913607df

12 years agoAvoid a (harmless) buffer overread that is possible on an OOM when
drh [Mon, 31 Mar 2014 13:42:42 +0000 (13:42 +0000)] 
Avoid a (harmless) buffer overread that is possible on an OOM when
MEMSYS5 is engaged.

FossilOrigin-Name: b3296267fb67b9f59719a37093253062edde3746

12 years agoExperiments in picking better query plans, especially when the usage of one
drh [Sat, 29 Mar 2014 21:16:07 +0000 (21:16 +0000)] 
Experiments in picking better query plans, especially when the usage of one
index is a subset of another.

FossilOrigin-Name: 8f869ca7a6eaa9ca7a08102290e6c606735f9090

12 years agoFix a broken assert() in vdbesort.c.
dan [Sat, 29 Mar 2014 10:01:58 +0000 (10:01 +0000)] 
Fix a broken assert() in vdbesort.c.

FossilOrigin-Name: 18d1b402f2dbe78f1a1113bb356b710e348365ef

12 years agoFix a problem in vdbesort.c causing spurious SQLITE_NOMEM errors when using memsys3...
dan [Sat, 29 Mar 2014 09:34:45 +0000 (09:34 +0000)] 
Fix a problem in vdbesort.c causing spurious SQLITE_NOMEM errors when using memsys3 or memsys5.

FossilOrigin-Name: a683c05f6250389e84b980b16559e162ba1a27c2

12 years agoAdd the optimization to avoid some unnecessary calls to sqlite3VdbeRecordUnpack(...
dan [Sat, 29 Mar 2014 06:27:35 +0000 (06:27 +0000)] 
Add the optimization to avoid some unnecessary calls to sqlite3VdbeRecordUnpack() added to the trunk by [707ea170b3].

FossilOrigin-Name: fc4d04e6b039ea5aeb47739e38c5926e63a4b01b

12 years agoFix a compiler warning and an after-OOM memory leak.
drh [Fri, 28 Mar 2014 19:47:19 +0000 (19:47 +0000)] 
Fix a compiler warning and an after-OOM memory leak.

FossilOrigin-Name: 58f7ca29303c280229f86d01f418e1de5f5aebba

12 years agoMerge latest changes from orderby-planning branch.
dan [Fri, 28 Mar 2014 19:18:16 +0000 (19:18 +0000)] 
Merge latest changes from orderby-planning branch.

FossilOrigin-Name: 4c7fb5423430f3b936befaa7c309f8e1968ee7d8

12 years agoMerge the latest changes from trunk.
drh [Fri, 28 Mar 2014 18:35:39 +0000 (18:35 +0000)] 
Merge the latest changes from trunk.

FossilOrigin-Name: 3047a25f1c41e83f0b4772f7c36fbfec0f12dc7e

12 years agoDisable the wal64k.test script for non-unix systems since it depends on
drh [Fri, 28 Mar 2014 14:41:35 +0000 (14:41 +0000)] 
Disable the wal64k.test script for non-unix systems since it depends on
unix-only features.

FossilOrigin-Name: 27deb6e49bcc76714dbdc61b34748603155ac770

12 years agoFix a harmless compiler warning.
drh [Fri, 28 Mar 2014 12:56:57 +0000 (12:56 +0000)] 
Fix a harmless compiler warning.

FossilOrigin-Name: a4e47150f32b3a4120b1f89ccc66d633d829e3bb

12 years agoEnhance the sqlite3VdbeRecordCompare() routines so that if they encounter
drh [Fri, 28 Mar 2014 03:12:48 +0000 (03:12 +0000)] 
Enhance the sqlite3VdbeRecordCompare() routines so that if they encounter
database corruption, they will set the UnpackedRecord.isCorrupt field and
return 0.  The sqlite3BtreeMovetoUnpacked() routine detects this and returns
SQLITE_CORRUPT, causing the corruption to be reported back to the top-level.

FossilOrigin-Name: 7fa85eaaaf6d211378620d728a759fdfe30a15b0

12 years agoInstead of allocating a single large buffer at the beginning of each sort operation...
dan [Thu, 27 Mar 2014 19:25:02 +0000 (19:25 +0000)] 
Instead of allocating a single large buffer at the beginning of each sort operation, start with a small buffer and extend it using realloc() as required.

FossilOrigin-Name: 81987c8ceb64f051528a6ca42673821d9ab7c0ff

12 years agoMinor cleanup of the code in the query planner that computes the costs
drh [Thu, 27 Mar 2014 18:36:34 +0000 (18:36 +0000)] 
Minor cleanup of the code in the query planner that computes the costs
estimates for the various plans.  There are no changes to the costs at this
time.  But the code is slightly more readable now and that might facilitate
future enhancements.

FossilOrigin-Name: 9b4d7226bcee38be5ac68a54bee03b4179cb69fc

12 years agoUse xFetch() to access temporary files in vdbesort.c. Use a single large allocation...
dan [Thu, 27 Mar 2014 17:23:41 +0000 (17:23 +0000)] 
Use xFetch() to access temporary files in vdbesort.c. Use a single large allocation instead of many small allocations when accumulating records in vdbesort.c. This is an interim commit - it allocates a buffer the size of the page-cache every time data is sorted.

FossilOrigin-Name: f4ac1bf28c4ba395ccab8f1c9df72614a61095a7

12 years agoEnhance the logest.c utility with new operators: "dup", "inv", "log", and
drh [Thu, 27 Mar 2014 14:05:38 +0000 (14:05 +0000)] 
Enhance the logest.c utility with new operators: "dup", "inv", "log", and
"nlogn".  Provide help on an invalid input.

FossilOrigin-Name: b4bd2a062c4baf5f622d61b7411f00de5904ef56

12 years agoMerge the latest trunk changes and the fix for the crash on a corrupt
drh [Thu, 27 Mar 2014 00:09:00 +0000 (00:09 +0000)] 
Merge the latest trunk changes and the fix for the crash on a corrupt
database.

FossilOrigin-Name: 0b35346c32dba14963c85ec178f2b46aa2bbf6dc

12 years agoMerge from trunk the fix for the crash on a corrupt database.
drh [Wed, 26 Mar 2014 19:45:01 +0000 (19:45 +0000)] 
Merge from trunk the fix for the crash on a corrupt database.

FossilOrigin-Name: 8cb2b02baa7ef9aa96319e977f0315328f944237

12 years agoMerge in fixes (including the corrupt-database crash fix) and
drh [Wed, 26 Mar 2014 19:43:30 +0000 (19:43 +0000)] 
Merge in fixes (including the corrupt-database crash fix) and
performance enhancements from trunk.

FossilOrigin-Name: fc8ca1a87e7127bd28f32fd809aec3e24355fbfa

12 years agoAdd an extra test case for the potential buffer overread patched by [28ddecff04].
dan [Wed, 26 Mar 2014 15:14:59 +0000 (15:14 +0000)] 
Add an extra test case for the potential buffer overread patched by [28ddecff04].

FossilOrigin-Name: f585f5d7a0f9bf8c590388654a3638231eba8892

12 years agoAdd a test case to verify that the previous change avoids excess buffer
drh [Wed, 26 Mar 2014 15:05:56 +0000 (15:05 +0000)] 
Add a test case to verify that the previous change avoids excess buffer
overread in sqlite3VdbeRecordCompare().

FossilOrigin-Name: 2b28e8d582cf10936fa1faca04a16ca2eeead66f

12 years agoEarlier detection of corruption in sqlite3VdbeRecordCompare() in order to
drh [Wed, 26 Mar 2014 14:51:07 +0000 (14:51 +0000)] 
Earlier detection of corruption in sqlite3VdbeRecordCompare() in order to
avoid a potential buffer overread.

FossilOrigin-Name: 28ddecff044dbc2dff50a7d8406ab67dfe06587f

12 years agoAdd an assert() and a comment to clarify the operation of the
drh [Wed, 26 Mar 2014 12:02:38 +0000 (12:02 +0000)] 
Add an assert() and a comment to clarify the operation of the
vdbeRecordCompareInt() routine.

FossilOrigin-Name: 851abdb8fd9b5a8a6ce21db53d30dbac3c430cc7

12 years agoAdjust the repeat counts on several tests in speedtest1 so that the relative
drh [Tue, 25 Mar 2014 20:28:38 +0000 (20:28 +0000)] 
Adjust the repeat counts on several tests in speedtest1 so that the relative
time spent on the test is roughly the same regardless of --size.

FossilOrigin-Name: 7922809ee0d3978ce9221fbb7df63aa0684d0c4d

12 years agoMerge enhancements and fixes from trunk.
drh [Tue, 25 Mar 2014 18:29:12 +0000 (18:29 +0000)] 
Merge enhancements and fixes from trunk.

FossilOrigin-Name: e005f2d6dd9faf38cc8fdb9428b5aa6192a6adae

12 years agoAdd another performance test case to speedtest1. This case is another
drh [Tue, 25 Mar 2014 17:45:49 +0000 (17:45 +0000)] 
Add another performance test case to speedtest1.  This case is another
ORDER BY test but this time without LIMIT.

FossilOrigin-Name: 9ab7ffd59209aef0ffbf384b3902a93fd3b86a6d

12 years agoFix a problem in the code added by [707ea170b3] causing vdbesort.c to sort unstably.
dan [Tue, 25 Mar 2014 17:07:48 +0000 (17:07 +0000)] 
Fix a problem in the code added by [707ea170b3] causing vdbesort.c to sort unstably.

FossilOrigin-Name: d3e640afe611b6ae0b7f2cff5b00900d7e4d5ee3

12 years agoRemove the sequence values from sorter records used by ORDER BY as well.
dan [Tue, 25 Mar 2014 15:04:07 +0000 (15:04 +0000)] 
Remove the sequence values from sorter records used by ORDER BY as well.

FossilOrigin-Name: c3ae3697832a00d4d5758988a8766bdbb691e6b8

12 years agoAdd an ORDER BY test case to speedtest1.c
drh [Tue, 25 Mar 2014 14:54:36 +0000 (14:54 +0000)] 
Add an ORDER BY test case to speedtest1.c

FossilOrigin-Name: 588122641e57e957813d329ea071e13ccbde5acd

12 years agoEnable four sorting threads by default in the command-line shell.
drh [Tue, 25 Mar 2014 14:12:16 +0000 (14:12 +0000)] 
Enable four sorting threads by default in the command-line shell.

FossilOrigin-Name: 1cab83577c814feb35b4fb91af0d52a9751d99bc