drh
382bdeabef
Enhance the logest.c utility with new operators: "dup", "inv", "log", and
...
"nlogn". Provide help on an invalid input.
FossilOrigin-Name: b4bd2a062c4baf5f622d61b7411f00de5904ef56
2014-03-27 14:05:38 +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
drh
664eb14d8e
Merge from trunk the fix for the crash on a corrupt database.
...
FossilOrigin-Name: 8cb2b02baa7ef9aa96319e977f0315328f944237
2014-03-26 19:45:01 +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
e2ac506704
Add an assert() and a comment to clarify the operation of the
...
vdbeRecordCompareInt() routine.
FossilOrigin-Name: 851abdb8fd9b5a8a6ce21db53d30dbac3c430cc7
2014-03-26 12:02:38 +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
dan
78d5843245
Remove the sequence values from sorter records used by ORDER BY as well.
...
FossilOrigin-Name: c3ae3697832a00d4d5758988a8766bdbb691e6b8
2014-03-25 15:04:07 +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
3c863634ef
Enable four sorting threads by default in the command-line shell.
...
FossilOrigin-Name: 1cab83577c814feb35b4fb91af0d52a9751d99bc
2014-03-25 14:12:16 +00:00
drh
5c2b314222
Merge all fixes and enhancements from trunk.
...
FossilOrigin-Name: b415dfb6cb0df0c69992ca2bb700c15664f158e6
2014-03-25 13:17:41 +00:00
drh
86dd3716b9
Detect when a VdbeCursor is still pointing at a valid row but that row has
...
moved, and invalidated the return from prior sqlite3BtreeDataFetch() or
sqlite3BtreeKeyFetch() calls.
FossilOrigin-Name: e6798871ce94961135762669af418cd78540c121
2014-03-25 11:00:21 +00:00
dan
dd23c6bfb4
Omit the sequence value from sorter records used by GROUP BY queries that cannot use an index.
...
FossilOrigin-Name: 3f90abddc31ac20739778c235a834c33f7057997
2014-03-24 20:19:07 +00:00
drh
fd0a2f9756
Avoid unnecessary moving of content between registers during an ORDER BY.
...
FossilOrigin-Name: 4f472accf072d9cb64f209923924b26f21b13d27
2014-03-24 18:08:15 +00:00
dan
b22f38a779
Remove unused variables Parse.nColCache and Parse.iColCache.
...
FossilOrigin-Name: 4d7551ce464c8038147e81667368924f2a7485a6
2014-03-24 16:30:06 +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
dan
3f802ebce2
Remove an unnecessary temporary register allocation.
...
FossilOrigin-Name: 5d506743f541b022cde04a9606baa4680cdfd70b
2014-03-24 09:34:58 +00:00
drh
83553eefaf
Remove a pointless OP_Once operation in ORDER BY clauses with LIMIT.
...
FossilOrigin-Name: e6c59d23316c83b318b1a94d9b28a5d321737fa5
2014-03-24 02:20:53 +00:00
drh
70f624c3a9
Further enhancements to geneverated VDBE code for ORDER BY.
...
FossilOrigin-Name: e7188fad87ec82d36a39b80ccaf8006bf45a9bcd
2014-03-24 01:43:50 +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
323913c880
Avoid a possible use of an uninitialized variable following an I/O or OOM
...
error.
FossilOrigin-Name: 641408a1395bfc911ca619ef9e5f073b913d856b
2014-03-23 16:29:23 +00:00
drh
dbfca2b7f8
Clear the sort-order flags on the KeyInfo object associated with the
...
OP_Compare/OP_Jump of the block-sort logic, in order to make the OP_Jump
fully testable.
FossilOrigin-Name: 9b2838f23e5f52369eeb078f60bd231cc54362f8
2014-03-22 02:19:53 +00:00
drh
c83a6bed04
Increase the version number to 3.8.5.
...
FossilOrigin-Name: 9760879d086b61476890927f01806a93798d4eee
2014-03-22 01:52:17 +00:00
drh
59b8f2e108
Fix the ORDER BY optimization logic so that it will do a block-sort on
...
a partial DESC ORDER BY. This enhancement uncovered a memory leak in
pushUntoSorter() which is also fixed.
FossilOrigin-Name: c36f74611cf17ad2ff198a2ac2054d7ab451a72c
2014-03-22 00:27:14 +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
drh
8e1ee88c88
Change the names of SRT_DistTable and SRT_Table used by CTE to more
...
meaningful SRT_DistFifo and SRT_Fifo, respectively. Simplify the
IgnorableOrderby() macro in the process.
FossilOrigin-Name: 45d8cc678d128f1dda6469864215a8ed9de4366a
2014-03-21 19:56:09 +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
5b1420e046
Remove a testcase() that is now always true due to the "x IN (?)" optimization.
...
Add an ALWAYS() around a conditional in the parser that cannot be false.
FossilOrigin-Name: d5a1530bdc7ace053d05d1a037551110021d3758
2014-03-20 19:04:56 +00:00
dan
9bc21b535e
Only use the direct-overflow-read optimization if all data from the overflow page in question is being read.
...
FossilOrigin-Name: d8e1f75ddf10f3c0b21acd5455f90fdcea54a948
2014-03-20 18:56:35 +00:00
drh
8ad0de3f72
Fix the EXPLAIN indenter in the command-line shell to correctly
...
handle NextIfOpen and PrevIfOpen opcodes.
FossilOrigin-Name: 01944c53f5c129f48ce8842faaedcf5607dd381e
2014-03-20 18:45:27 +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
4ef7efad5e
Fix harmless compiler warnings.
...
FossilOrigin-Name: b1435f26b07b2208cfcca557f96342a5bd0d5328
2014-03-20 15:14:08 +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
drh
0c8a934cb4
Fix an unnecessarily obtuse use of a bitmask flag.
...
FossilOrigin-Name: ca3140813198ab7ce470cf86334e55207f3461f9
2014-03-20 12:17:35 +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
dan
781e34cde3
Add an experimental fix to 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: 6f3a5c24d254fc6faf607b505bdef4a7aafc21af
2014-03-20 08:59:47 +00:00
drh
db1cc09c72
Merge the vdbesort.c optimization from trunk.
...
FossilOrigin-Name: e4bfffb988283c077778c60696be0d285ad66c3c
2014-03-19 23:42:51 +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
344510e62b
Avoid some unnecessary calls to sqlite3VdbeRecordUnpack() that were being made when merging data from two or more temp files together in vdbesort.c
...
FossilOrigin-Name: 707ea170b3e26965b7e3982f7554d122d130b9a6
2014-03-19 20:01:25 +00:00