diff options
Diffstat (limited to 'storage/innobase/handler')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 12 | ||||
-rw-r--r-- | storage/innobase/handler/handler0alter.cc | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 8a37c67eb6a..1fcfefa8b47 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -7396,9 +7396,12 @@ ha_innobase::build_template( ulint num_v = 0; - if ((active_index != MAX_KEY - && active_index == pushed_idx_cond_keyno) - || (pushed_rowid_filter && rowid_filter_is_active)) { + if (active_index != MAX_KEY + && active_index == pushed_idx_cond_keyno) { + m_prebuilt->idx_cond = this; + goto icp; + } else if (pushed_rowid_filter && rowid_filter_is_active) { +icp: /* Push down an index condition or an end_range check. */ for (ulint i = 0; i < n_fields; i++) { const Field* field = table->field[i]; @@ -7579,9 +7582,6 @@ ha_innobase::build_template( } } } - if (active_index == pushed_idx_cond_keyno) { - m_prebuilt->idx_cond = this; - } } else { no_icp: /* No index condition pushdown */ diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc index 3ffd7347472..e592f12340d 100644 --- a/storage/innobase/handler/handler0alter.cc +++ b/storage/innobase/handler/handler0alter.cc @@ -1993,7 +1993,7 @@ static bool innobase_table_is_empty(const dict_table_t *table, btr_pcur_t pcur; buf_block_t *block; page_cur_t *cur; - const rec_t *rec; + rec_t *rec; bool next_page= false; mtr.start(); @@ -2004,9 +2004,9 @@ non_empty: mtr.commit(); return false; } - btr_pcur_move_to_next_user_rec(&pcur, &mtr); - if (!rec_is_metadata(btr_pcur_get_rec(&pcur), *clust_index)) - btr_pcur_move_to_prev_on_page(&pcur); + rec= page_rec_get_next(btr_pcur_get_rec(&pcur)); + if (rec_is_metadata(rec, *clust_index)) + btr_pcur_get_page_cur(&pcur)->rec= rec; scan_leaf: cur= btr_pcur_get_page_cur(&pcur); page_cur_move_to_next(cur); |