3361 Ole John Aske 2010-11-11
spj-svs: Remove dead code which accidentially was included in my prev. commit :-/
3360 Ole John Aske 2010-11-11
spj-svs: Followup on commit 'revno: 3322' (Less eager order access request)
This commit was based on the idea that we could disable the ordered index
usage by setting 'QUICK_SELECT_I::sorted=false' when we later decided to use a filesort
to provide the ordered resultset.
However, for QUICK_SELECT_DESC the implementation internals also assumed the underlying
table to return its result in sorted order. It will therefore cause incorrect results
if 'sorted' is disabled for QUICK_SELECT_DESC.
AQP::is_fixed_ordered_index() has been introduced for the purpose of identifying those
QUICK_SELECT's which has 'fixed' its access to use an 'ordered_index'.
Furthermore, QUICK_SELECT_DESC::reset() has been extended to make sure that 'sorted= 1'
before the QUICK_SELECT_DESC resulset is made available.
=== modified file 'sql/abstract_query_plan.cc'
--- a/sql/abstract_query_plan.cc 2010-11-11 13:07:41 +0000
+++ b/sql/abstract_query_plan.cc 2010-11-11 13:19:27 +0000
@@ -402,14 +402,6 @@ namespace AQP
(quick->get_type() == QUICK_SELECT_I::QS_TYPE_ROR_INTERSECT) ||
(quick->get_type() == QUICK_SELECT_I::QS_TYPE_ROR_UNION)));
- if (quick->get_type() == QUICK_SELECT_I::QS_TYPE_RANGE_DESC)
- m_access_type= AT_OTHER; // Multiple PKs are produced by merge
- m_other_access_reason = "DESCending ORDER BY can not be pushed while using index";
// JT_INDEX_MERGE: We have a set of qualifying PKs as root of pushed joins
if (quick->index == MAX_KEY)
No bundle (reason: useless for push emails).
|• bzr push into mysql-5.1-telco-7.0-spj-scan-vs-scan branch(ole.john.aske:3360 to 3361) ||Ole John Aske||11 Nov|