diff --git a/sql/sql_select.cc b/sql/sql_select.cc index bea748562eb..825d3c870d8 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -9788,6 +9788,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, table->in_use= thd; table->quick_keys.init(); table->covering_keys.init(); + table->merge_keys.init(); table->keys_in_use_for_query.init(); table->s= share; diff --git a/sql/table.cc b/sql/table.cc index 17454ffb012..f67929ad96b 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1652,6 +1652,7 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, goto err; outparam->quick_keys.init(); outparam->covering_keys.init(); + outparam->merge_keys.init(); outparam->keys_in_use_for_query.init(); /* Allocate handler */