drh
f932f7145e
Fix a problem with a stale Select.pWith pointer when a CTE is used together
...
with a compound query and an ORDER BY clause.
FossilOrigin-Name: 9a453f52a2b30595891604ede7d4acf61c2736a1
2015-04-12 17:35:27 +00:00
dan
b33c50f215
Fix a problem with resolving ORDER BY clauses that feature COLLATE clauses attached to compound SELECT statements.
...
FossilOrigin-Name: 427b50fba7362e5b447e79d39050f25ed2ef10af
2015-04-04 16:43:16 +00:00
drh
8f9d0b2b25
Correctly detect the error of having a "*" wildcard on a SELECT without
...
a FROM clause on the left-hand side of a recursive CTE.
FossilOrigin-Name: b11d1793a06a44931edcbf12a615b49794d53a62
2015-03-21 03:18:22 +00:00
drh
16897072b5
Refactor some jump opcodes in the VDBE. Add JumpZeroIncr and DecrJumpZero.
...
Fix the LIKE optimization to work with DESC sort order.
FossilOrigin-Name: 26cb5145bf52f8c3fffa8c69b6c24aee4d974883
2015-03-07 00:57:37 +00:00
drh
2308ed3854
Propagate the COLLATE operator upward through function calls.
...
Initial fix for ticket [ca0d20b6cdddec5e8].
FossilOrigin-Name: c053448a55f9d030e8ffe88cf4fc14ada7f6ec19
2015-02-09 16:09:34 +00:00
drh
885a5b030e
Disable the query flattener for aggregate subqueries if the parent query
...
uses other subqueries in its result set or WHERE clause or ORDER BY clause.
Preliminary fix for ticket [2f7170d73bf9abf8]. However it still contains
a defect similar to the COLLATE problem of [ca0d20b6cddd].
FossilOrigin-Name: 0b7d65e3fda676d193347cb782854c28a48252af
2015-02-09 15:21:36 +00:00
drh
17645f5eec
In selecttrace 0x100 mode, show the parse tree after name resolution instead
...
of before flattening, so that it is always seen even if flattening does not
occur. Also: add the hex pointer value to the top of each SELECT tree.
FossilOrigin-Name: aa093fef2d2a7e26d987b46654963e4d7e66d444
2015-02-09 13:42:59 +00:00
drh
0e86a1ac08
In selecttrace mode 0x100, show a complete parse-tree both before and after
...
query flattening. This is a change to debugging code only.
FossilOrigin-Name: b3c6b8a3c1075d2a87cef68f061d6a0098e6d8d0
2015-02-09 11:54:41 +00:00
drh
2b8c5a0039
Make sure errors in the FROM clause of a SELECT cause analysis to abort
...
and unwind the stack before those errors have a chance to mischief
in the "*" column-name wildcard expander. Fix for ticket [32b63d542433ca67].
FossilOrigin-Name: 9e6eae660a02303fd140dac5fbff82364f4120cd
2015-01-22 12:00:17 +00:00
drh
fe201effbe
Fix another instance of an incorrect value for KeyInfo.nXField on a
...
sorting index. Ticket [f97c4637102a3ae72b79].
FossilOrigin-Name: 0077f64510f9b9ce90032df2696cb242d097ab84
2015-01-20 03:04:29 +00:00
drh
3f39bcf5bc
Make sure that the KeyInfo.nXField value of ephermeral tables used for
...
ORDER BY and GROUP BY is set correctly, so that the correct comparison
function can be choosen by sqlite3VdbeFindCompare().
FossilOrigin-Name: c16bae5e699b851f4ca8414c5dfa5370b18f69f0
2015-01-19 20:59:34 +00:00
drh
3afd2b4d6d
Avoid O(N*N) behavior with very long lists of VALUES.
...
FossilOrigin-Name: ee30fb35217f3429ee89aaad7c19f29710420e4c
2015-01-05 20:04:51 +00:00
drh
45f54a5778
Handle compound-select statements originating from VALUES clauses as a
...
special case that does not use recursion.
FossilOrigin-Name: 9ce9e43af38e6bc362734463d4bfc40ff0c98f8f
2015-01-05 19:16:42 +00:00
drh
b87fbed5a3
Remove some needless recursion from compound SELECT processing.
...
FossilOrigin-Name: fe677d13f03e24fa667efc0c2e7f5bbb99521791
2015-01-05 15:48:45 +00:00
drh
dea7d70d1b
Make sure that a DISTINCT query with an ORDER BY works correctly even if
...
it uses a descending index. Fix for ticket [c5ea805691bfc4204b1cb9e].
FossilOrigin-Name: 0d3aef97ebddf422b8bdcbc5878970c6129e3f54
2014-12-04 21:54:58 +00:00
drh
6cf4a7dfa6
Remove the OPFLAG_CLEARCACHE flag from OP_Column. In its place, change the
...
P3 parameter of OP_SorterData to be the index of the pseudo-table cursor whose
record header cache is to be cleared. This gives a small size reduction
and performance increase.
FossilOrigin-Name: 20062f49428a2349a2dd705af570c60b499a3eef
2014-10-13 13:00:58 +00:00
drh
b08cd3f345
Improvements to the new syntax-tree output routines: Omit the "END SELECT"
...
mark and instead terminate the graph at the last item. Increase the maximum
tree depth to 100.
FossilOrigin-Name: 5ce05757aac80b99c3b2141cd301809f8e28e661
2014-09-30 19:04:41 +00:00
drh
c90713d3d2
Show tree diagrams of data structures in the debugging output when the 0x100
...
bit is set on sqlite3WhereTrace or sqlite3SelectTrace.
FossilOrigin-Name: 92e0b4bd4d75e8b000586e51a07b3e181d9af20b
2014-09-30 13:46:49 +00:00
drh
4fa4a54f7e
Remove the SQLITE_ENABLE_TREE_EXPLAIN compile-time option. Add alternative
...
debugging display routines: sqlite3TreeViewExpr(), sqlite3TreeViewExprList(),
and sqlite3TreeViewSelect().
FossilOrigin-Name: 4ff51325d6b41d0c59e303b573700ec80c51d216
2014-09-30 12:33:33 +00:00
drh
eb9b884c2d
Improved ".selecttrace" output.
...
FossilOrigin-Name: c0b61f7092a7fd2c5f51db26ce7a7a5c75c227fe
2014-09-21 00:27:26 +00:00
dan
7c0a4720ca
Candidate fix for [d11a6e908f].
...
FossilOrigin-Name: 89398880bcfff96e91d2a9c45774f5fb3209ffc1
2014-09-20 20:38:48 +00:00
drh
9300adbc79
Fix the SELECTTRACE_ENABLE macro so that it doesn't cause problems for
...
testfixture. Add new SELECTTRACE() calls.
FossilOrigin-Name: f1ba68f131d2f03e4a7bc50cde23a7609d384279
2014-09-20 20:24:49 +00:00
drh
abd4c72357
Enable SELECT query planning tracing when compiled with
...
SQLITE_ENABLE_SELECTTRACE and either SQLITE_DEBUG or SQLITE_TEST.
FossilOrigin-Name: cbe0cf9ddf46f0a678c85d49bfa74e3b7712e1a1
2014-09-20 18:18:33 +00:00
drh
9588ad95c1
Do not flatten aggregate subqueries that contain min() or max() functions
...
so that if the min()/max() are discarded by the outer query, they still
function and cause non-aggregate expression to be evaluated on the minimal
or maximal row.
FossilOrigin-Name: 0bdf1a086b3946722f4d4b328e25917f61c14713
2014-09-15 14:46:02 +00:00
drh
6092d2bcfe
Adjust comments to show that subquery flattening restriction (10) was
...
removed from the code back in 2005. This is a comment change only.
FossilOrigin-Name: 4ff0eb96bc364baed2d8005c69291ca9240b99dd
2014-09-15 11:14:50 +00:00
drh
236241aeb0
Simplify the way the column cache is managed around OP_Move instructions.
...
FossilOrigin-Name: 320556233e19cdd9d590a09655c3465754700d39
2014-09-12 17:41:30 +00:00
peter.d.reid
60ec914c74
Fix typos in comments. No code changes.
...
FossilOrigin-Name: e62aab5e9290503869e1f4d5e0fefd2b4dee0a69
2014-09-06 16:39:46 +00:00
drh
503ae86508
Merge recent performance enhancements from trunk onto the threads branch.
...
FossilOrigin-Name: 35c44a3c73e2e8b14ff194c41986f4bdb9dfe737
2014-08-29 14:40:07 +00:00
drh
53932ce8fa
Avoid an unnecessary OP_Move operation for expression subqueries.
...
FossilOrigin-Name: 462f42af52f146fd328ddcbbe78c8444ef7bd2c3
2014-08-29 12:29:39 +00:00
drh
83b25d32d7
Merge the pre-3.8.6 changes into the threads branch.
...
FossilOrigin-Name: a608fd1d52606a009c3acc7f1d184b86a7df3c82
2014-08-14 14:02:48 +00:00
drh
fcf2a7757e
Fix an assert() statement in the SELECT code generator that was
...
incorrect following an OOM error.
FossilOrigin-Name: a179e41e40dba4c19a488985f77777acd27b689d
2014-08-12 01:23:07 +00:00
drh
da2e5862d1
Merge all recent changes from trunk.
...
FossilOrigin-Name: a353a8515fb2eff86042d0c33e39772f4d04e0b3
2014-08-06 02:03:35 +00:00
drh
4336b0e64a
Improved VdbeCoverage() macros. A few minor simplifications to generated
...
VDBE code.
FossilOrigin-Name: 01f60027ad1841051fa493a646141445f8971357
2014-08-05 00:53:51 +00:00
drh
d0dc5d4984
Avoid closing a pseudo-table associated with sorting in a co-routine since
...
that pseudo-table might be used again in an outer loop.
FossilOrigin-Name: 6d81805298ea882f5fee99504d5a95f1a762a90b
2014-06-03 14:42:34 +00:00
drh
ff14013496
Merge changes from the trunk into the threads branch.
...
FossilOrigin-Name: 416cb091267de91b9cadee9f7453b8627570b7d3
2014-05-29 20:24:20 +00:00
drh
48dd1d8e28
Change the name of the Index.autoIndex field to Index.idxType and provide
...
symbolic names for the various values of that field rather than using
magic numbers.
FossilOrigin-Name: d16e575dacc811de0f7b58a0d1cd243678dce6c5
2014-05-27 18:18:58 +00:00
drh
79045882c9
Merge recent trunk changes into the threads branch.
...
FossilOrigin-Name: 8215202759dbd863edf20aa26ff21da20bc35d73
2014-05-26 20:15:21 +00:00
dan
e96f2df3dd
Changes to the output of EXPLAIN QUERY PLAN to make it clearer when a query uses the PRIMARY KEY index of a WITHOUT ROWID table.
...
FossilOrigin-Name: 9268df305b90ac11e44b3107bbab5becf38860b7
2014-05-23 17:17:06 +00:00
drh
fb0d6e56d6
Merge latest trunk enhancements and fixes into the orderby-planning branch.
...
FossilOrigin-Name: 84862d3a095629d20c8e7b8a16f4dc26cd41ab6d
2014-05-02 13:09:06 +00:00
dan
3852413246
Fix an obscure problem to do with temp register allocation that could occur if more than one simple SELECT within a compound SELECT uses a partial sort.
...
FossilOrigin-Name: 427409ae106cdab7892a6b50fe30c5f52de5addc
2014-05-01 20:26:48 +00:00
dan
cfc9df76e1
Store values loaded from the stat1 table as logarithmic values in memory.
...
FossilOrigin-Name: 1bd74c49ddab6f53bb6eaa57907eff44c2580dd6
2014-04-25 15:01:01 +00:00
drh
0ff435a782
Reopen the orderby-planning branch and merge in the latest trunk enhancements
...
and fixes.
FossilOrigin-Name: 6077ddcd93318e24b9756adaaf293ba9fb3cedf7
2014-04-24 15:06:25 +00:00
dan
374cd78c1d
Avoid discarding an ORDER BY clause in the case where an identical GROUP BY clauses uses an index to group, but not sort, the rows. Fix for [b75a9ca6b0].
...
FossilOrigin-Name: de9a490f594183f337a2ec9e0f87792eac83548b
2014-04-21 13:21:56 +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
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
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