diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2009-12-15 20:23:55 +0300 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2009-12-15 20:23:55 +0300 |
commit | 59b64720102f8f4f43c856f1e9c2ba2007156b18 (patch) | |
tree | 16ea30fc86361b17dd05766e4aaf9b4b12275c09 /sql/ds_mrr.cc | |
parent | 2a496c4dcfaa715588fa48009b7779d38b1a137a (diff) | |
download | mariadb-git-59b64720102f8f4f43c856f1e9c2ba2007156b18.tar.gz |
Backport into MariaDB-5.2 the following:
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface"
WL#2475 "Batched range read functions for MyISAM/InnoDb"
"Index condition pushdown for MyISAM/InnoDB"
- Adjust test results (checked)
- Code cleanup.
Diffstat (limited to 'sql/ds_mrr.cc')
-rw-r--r-- | sql/ds_mrr.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sql/ds_mrr.cc b/sql/ds_mrr.cc index 7a0fc65b8f5..0bf63e95a1f 100644 --- a/sql/ds_mrr.cc +++ b/sql/ds_mrr.cc @@ -950,8 +950,15 @@ void push_index_cond(JOIN_TAB *tab, uint keyno, bool other_tbls_ok) ((tab->table->file->index_flags(keyno, 0, 1) & HA_DO_INDEX_COND_PUSHDOWN) && tab->join->thd->variables.engine_condition_pushdown); - // psergey: - // + + /* + Do not try index condition pushdown on indexes which have partially-covered + columns. Unpacking from a column prefix into index tuple is not a supported + operation in some engines, see e.g. MySQL BUG#42991. + TODO: a better solution would be not to consider partially-covered columns + as parts of the index and still produce/check index condition for + fully-covered index columns. + */ KEY *key_info= tab->table->key_info + keyno; for (uint kp= 0; kp < key_info->key_parts; kp++) { @@ -961,7 +968,7 @@ void push_index_cond(JOIN_TAB *tab, uint keyno, bool other_tbls_ok) break; } } - // :psergey + /* When WL#5116 is done this DBUG statement must be removed. It's just a temporary hack to allow us to discriminate whether a test failure relates @@ -984,7 +991,8 @@ void push_index_cond(JOIN_TAB *tab, uint keyno, bool other_tbls_ok) Item *idx_remainder_cond= 0; tab->pre_idx_push_select_cond= tab->select_cond; #if 0 - // The following is only needed for BKA: + /* + psergey: enable the below when we backport BKA: */ /* For BKA cache we store condition to special BKA cache field because evaluation of the condition requires additional operations |