dan
4be4c406fa
Avoid having the sorter merge too many PMAs at a time when incrementally merging data following a SorterRewind().
...
FossilOrigin-Name: 98bf0307b121b0776a7170108cc8d3f948a7ebfe
2014-04-11 19:43:07 +00:00
dan
d30ab3d9dd
Experimental multi-threaded sorting changes to allow the sorter to begin returning items to the VDBE before all data is sorted.
...
FossilOrigin-Name: f9d5e09afaf64d68a0e461c1c2f38179bcea4b1f
2014-04-09 20:04:17 +00:00
drh
85462ed939
Merge the latest trunk changes into the threads branch.
...
FossilOrigin-Name: 39ac79cffe716f88af0871bdd206231b6a6511ff
2014-04-04 18:37:36 +00:00
drh
853546d047
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
2014-04-04 18:20:35 +00:00
drh
1fb6a11072
Ensure the "PRAGMA journal_mode=WAL" works coming from any other journal_mode
...
with ATTACH-ed databases.
FossilOrigin-Name: e54330b43127e46fc6494748cbb353a6fc91cfd7
2014-04-04 14:12:52 +00:00
dan
8daefc2af0
Add test file sort3.test, which should have been part of commit [9d3351b8d7].
...
FossilOrigin-Name: dceed2c803fca23c83c02c448d5ae7c4698efee1
2014-04-04 07:52:44 +00:00
drh
1aca5caa88
Merge all recent changes from trunk.
...
FossilOrigin-Name: a0910079adde95245680dee59b43613b60903f10
2014-04-03 16:42:21 +00:00
drh
c438df1be0
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
2014-04-03 16:29:31 +00:00
dan
8930c2ab0c
Fix an integer overflow problem in the sorter.
...
FossilOrigin-Name: 9d3351b8d713232133dad149c73fb2a27c72abb1
2014-04-03 16:25:29 +00:00
dan
dd95d30f82
Fix some problems with OOM handling in vdbesort.c.
...
FossilOrigin-Name: 47e702bd8392bc50c4edaf6a2c8c499af87b520e
2014-04-02 15:15:25 +00:00
dan
fad9f9a8a6
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
2014-04-01 18:41:51 +00:00
dan
578e1ca8d7
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
2014-04-01 15:38:44 +00:00
dan
38fdead890
Fix a problem with OOM handling in the sorter code.
...
FossilOrigin-Name: 59cd5229e2b5be5272cf57c7e7d09e97d16a5425
2014-04-01 10:19:02 +00:00
drh
3fb183d2f7
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
2014-03-31 19:49:00 +00:00
dan
2f17001521
Merge latest changes from orderby-planning branch.
...
FossilOrigin-Name: 4c7fb5423430f3b936befaa7c309f8e1968ee7d8
2014-03-28 19:18:16 +00:00
drh
7c8e9c78c8
Merge the latest changes from trunk.
...
FossilOrigin-Name: 3047a25f1c41e83f0b4772f7c36fbfec0f12dc7e
2014-03-28 18:35:39 +00:00
drh
70c93204ea
Disable the wal64k.test script for non-unix systems since it depends on
...
unix-only features.
FossilOrigin-Name: 27deb6e49bcc76714dbdc61b34748603155ac770
2014-03-28 14:41:35 +00:00
drh
a1f7c0a21c
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
2014-03-28 03:12:48 +00:00
drh
bfa463696b
Merge the latest trunk changes and the fix for the crash on a corrupt
...
database.
FossilOrigin-Name: 0b35346c32dba14963c85ec178f2b46aa2bbf6dc
2014-03-27 00:09:00 +00:00
dan
68916c9fd3
Add an extra test case for the potential buffer overread patched by [28ddecff04].
...
FossilOrigin-Name: f585f5d7a0f9bf8c590388654a3638231eba8892
2014-03-26 15:14:59 +00:00
drh
d9c131c366
Add a test case to verify that the previous change avoids excess buffer
...
overread in sqlite3VdbeRecordCompare().
FossilOrigin-Name: 2b28e8d582cf10936fa1faca04a16ca2eeead66f
2014-03-26 15:05:56 +00:00
drh
182ea4e324
Earlier detection of corruption in sqlite3VdbeRecordCompare() in order to
...
avoid a potential buffer overread.
FossilOrigin-Name: 28ddecff044dbc2dff50a7d8406ab67dfe06587f
2014-03-26 14:51:07 +00:00
drh
5e8980ddb1
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
2014-03-25 20:28:38 +00:00
drh
e6c7b09df6
Merge enhancements and fixes from trunk.
...
FossilOrigin-Name: e005f2d6dd9faf38cc8fdb9428b5aa6192a6adae
2014-03-25 18:29:12 +00:00
drh
c872966ef4
Add another performance test case to speedtest1. This case is another
...
ORDER BY test but this time without LIMIT.
FossilOrigin-Name: 9ab7ffd59209aef0ffbf384b3902a93fd3b86a6d
2014-03-25 17:45:49 +00:00
dan
ab1dcc1a4b
Fix a problem in the code added by [707ea170b3] causing vdbesort.c to sort unstably.
...
FossilOrigin-Name: d3e640afe611b6ae0b7f2cff5b00900d7e4d5ee3
2014-03-25 17:07:48 +00:00
drh
0c60c1fe66
Add an ORDER BY test case to speedtest1.c
...
FossilOrigin-Name: 588122641e57e957813d329ea071e13ccbde5acd
2014-03-25 14:54:36 +00:00
drh
3d1d90a13d
Fix arithmetic operators so that they do not change the affinity of their
...
input operands. Ticket [a8a0d2996a].
FossilOrigin-Name: 221f8f944703108e47d789fa8ce6c00fe2abcbb6
2014-03-24 15:00:15 +00:00
dan
4979088506
Avoid attempting to mmap memory from an offset that is not a multiple of the system page size on systems with page sizes larger than 32KB.
...
FossilOrigin-Name: db7d62c8d58eb1e8654a762c9b199ae4e2759038
2014-03-24 11:23:17 +00:00
drh
d345a66428
merge fixes from trunk
...
FossilOrigin-Name: faf7f9caf526ab33a6fdb9c89b45a0483510db21
2014-03-23 18:47:00 +00:00
drh
f45f2326a2
Use only a single OP_MakeRecord instead of two when constructing entries
...
to go onto a sorter.
FossilOrigin-Name: d696cdedacd39075aa7fc407ab7c7e50f01d9f39
2014-03-23 17:45:03 +00:00
drh
9a4444778f
Add the ability to use indices for the first few terms of an ORDER BY clause,
...
then sort in batches to handle the later terms.
FossilOrigin-Name: fa06a6fed9f48322d9b89721799ba12c46efa898
2014-03-21 20:58:42 +00:00
dan
9afccba269
Avoid leaking memory in an obscure case where the flattener adds an ORDER BY clause to the recursive part of a recursive query.
...
FossilOrigin-Name: 1f413aca00015100224273480e1ce39a76bf93ab
2014-03-21 19:27:54 +00:00
drh
cc08fa48b8
Merge the OFFSET-on-query-without-FROM fix from trunk.
...
FossilOrigin-Name: 71e9ae72c272dc86720b2bfe719f57de437c400b
2014-03-21 18:45:19 +00:00
drh
a22a75e5ca
Fix the OFFSET clause so that it works correctly on queries that lack
...
a FROM clause. Ticket [07d6a0453d4ed8].
FossilOrigin-Name: 179ef81648b0ad557df78b7712f216b876b6fb65
2014-03-21 18:16:23 +00:00
drh
e99b9cdc70
New test case for block-sorting.
...
FossilOrigin-Name: e70cfa28aa393661ccc742ecd5e672d807bdd0a9
2014-03-21 15:24:07 +00:00
drh
f9f1bdb0c8
Merge trunk fixes for "x IN (?)" handling.
...
FossilOrigin-Name: eca35871c34374ca9189c7c9b6d490ac3c30357f
2014-03-20 20:56:49 +00:00
drh
fbb24d1092
The "x IN (?)" optimization in check-ins [2ff3b25f40] and [e68b427afb] is
...
incorrect, as demonstrated by the in4-5.1 test case in this check-in.
The "COLLATE binary" that was being added to the RHS of IN was overriding
the implicit collating sequence of the LHS. This change defines the EP_Generic
expression node property that blocks all affinity or collating sequence
information in the expression subtree and adds that property to the expression
taken from RHS of the IN operator.
FossilOrigin-Name: 2ea4a9f75f46eaa928ba17e9e91bc0432750d46d
2014-03-20 17:03:30 +00:00
drh
0a8d14261c
Previous check-in is not quite correct. "x IN (?)" is not exactly the same
...
as "x==?" do to collation and affinity issues. The correct converstion should
be to "x==(+? COLLATE binary)". The current check-in fixes this problem and
provides test cases. Ticket [e39d032577df69]
FossilOrigin-Name: 2ff3b25f40fd117c8a2da1d1a3625f6b167b7b16
2014-03-20 14:56:47 +00:00
drh
2b59b3a4c8
Convert expressions of the form "X IN (?)" with exactly one value on the
...
RHS of the IN into equality tests: "X=?". Add test cases to verify that
statements work correctly on this corner case.
Fix for ticket [e39d032577df6942].
FossilOrigin-Name: e68b427afbc82e201c64474117851aa4c9eb0c92
2014-03-20 13:26:47 +00:00
dan
bc76063cd2
Add a test to ensure os_unix.c works with 64KiB OS pages.
...
FossilOrigin-Name: e3d2be3ba47cdaafd26347620ae3bc2813203f16
2014-03-20 09:42:09 +00:00
drh
6284db908a
Fix query planner weights associated with choosing block-sorting. Fix
...
block sorting of tables with collating functions. Fix various test cases.
All "veryquick" tests are now passing, though more tests need to be added.
FossilOrigin-Name: 01afbf97c0ff29667806e9a7c4d74ca717819de5
2014-03-19 23:24:49 +00:00
dan
d88e521f59
Fix an obscure bug causing sqlite3_close() to fail if there are virtual tables on the disconnect list when it is called.
...
FossilOrigin-Name: 6504aa47a8ebb13827be017c4cb4b2dc3c4c55f4
2014-03-12 19:38:38 +00:00
dan
82d25da5b0
Changes to FTS to ensure that it does not access the database from within the xConnect method.
...
FossilOrigin-Name: c67a52c356416cc200f51f9168d942e78db11d34
2014-03-12 19:20:36 +00:00
drh
89212fb9f9
Adjustments to the cost computation for the skip-scan query plan, to take
...
into account the fact that a seek has to occur on each skip.
FossilOrigin-Name: 0769eebd028ce31375cf93509a1d3687f7b117eb
2014-03-10 20:12:31 +00:00
dan
b72cad14d0
Fix a bug causing "SELECT char()" to return SQLITE_NOMEM.
...
FossilOrigin-Name: ba39df9d4f7ffc6475ae0dc794f7d3f58c486de8
2014-03-08 19:07:03 +00:00
mistachkin
8879481868
Avoid calling sqlite3OsDelete() on a file that is open, since this causes Windows to run *very* slowly. Comes up on error recovery in journal_mode=PERSIST.
...
FossilOrigin-Name: fdc651e2ec7a0babee669e24fd56632e7cd5f0e9
2014-03-07 02:29:56 +00:00
dan
f0ec2a5ea7
Do not run corruptH.test in mmap mode.
...
FossilOrigin-Name: c0d54b4e41cba84dc5934e0fcd03fe422fe5c92b
2014-03-06 18:16:45 +00:00
dan
a6eaa635cc
Avoid running a couple of test cases that use realloc() extensively if SQLITE_MEMDEBUG is defined.
...
FossilOrigin-Name: e406d4bb786a34cdd5dd23ed39f35dfce3e1cabd
2014-03-05 19:13:32 +00:00
dan
13ef14afc1
Add tests to join.test to verify that it is not possible to use more than 64 tables in a join.
...
FossilOrigin-Name: ef1a998625e1fc051732228844388d6c59665382
2014-03-05 16:15:07 +00:00