From: Ole John Aske Date: November 11 2010 1:20pm Subject: bzr push into mysql-5.1-telco-7.0-spj-scan-vs-scan branch (ole.john.aske:3360 to 3361) List-Archive: http://lists.mysql.com/commits/123615 Message-Id: <20101111132010.BC174222@fimafeng09.norway.sun.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3361 Ole John Aske 2010-11-11 spj-svs: Remove dead code which accidentially was included in my prev. commit :-/ modified: sql/abstract_query_plan.cc 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: mysql-test/suite/ndb/r/ndb_join_pushdown.result mysql-test/suite/ndb/t/ndb_join_pushdown.test sql/abstract_query_plan.cc sql/abstract_query_plan.h sql/ha_ndbcluster.cc sql/opt_range.cc sql/opt_range.h === 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 0 - 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"; - } -#endif - // 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).