From a474f334948345127abbbdde7264436a998c8b75 Mon Sep 17 00:00:00 2001 From: "gkodinov/kgeorge@magare.gmz" <> Date: Sun, 11 Mar 2007 14:31:43 +0200 Subject: [PATCH] WL3527: post-merge updates sql_yacc.yy: WL3527: updated the diff to use correct parser words table.cc: WL3527: exteneded the fix for bug #20604 to fit the new variables sql_select.cc: WL3527: renamed used_keys to covering_keys --- sql/sql_select.cc | 2 +- sql/sql_yacc.yy | 2 +- sql/table.cc | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index d78b722632d..3a6cb754cbe 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -654,7 +654,7 @@ void JOIN::remove_subq_pushed_predicates(Item **where) static void save_index_subquery_explain_info(JOIN_TAB *join_tab, Item* where) { join_tab->packed_info= TAB_INFO_HAVE_VALUE; - if (join_tab->table->used_keys.is_set(join_tab->ref.key)) + if (join_tab->table->covering_keys.is_set(join_tab->ref.key)) join_tab->packed_info |= TAB_INFO_USING_INDEX; if (where) join_tab->packed_info |= TAB_INFO_USING_WHERE; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 01a813b4357..7da1ddc7cad 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -7548,7 +7548,7 @@ index_hint_clause: } | FOR_SYM JOIN_SYM { $$= INDEX_HINT_MASK_JOIN; } | FOR_SYM ORDER_SYM BY { $$= INDEX_HINT_MASK_ORDER; } - | FOR_SYM GROUP BY { $$= INDEX_HINT_MASK_GROUP; } + | FOR_SYM GROUP_SYM BY { $$= INDEX_HINT_MASK_GROUP; } ; index_hint_type: diff --git a/sql/table.cc b/sql/table.cc index daec7492500..fd810ae7478 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -4272,11 +4272,11 @@ bool st_table_list::process_index_hints(TABLE *table) /* apply USE INDEX */ if (!index_join[INDEX_HINT_USE].is_clear_all() || have_empty_use_join) - table->keys_in_use_for_query= index_join[INDEX_HINT_USE]; + table->keys_in_use_for_query.intersect(index_join[INDEX_HINT_USE]); if (!index_order[INDEX_HINT_USE].is_clear_all() || have_empty_use_order) - table->keys_in_use_for_order_by= index_order[INDEX_HINT_USE]; + table->keys_in_use_for_order_by.intersect (index_order[INDEX_HINT_USE]); if (!index_group[INDEX_HINT_USE].is_clear_all() || have_empty_use_group) - table->keys_in_use_for_group_by= index_group[INDEX_HINT_USE]; + table->keys_in_use_for_group_by.intersect (index_group[INDEX_HINT_USE]); /* apply IGNORE INDEX */ table->keys_in_use_for_query.subtract (index_join[INDEX_HINT_IGNORE]);