diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index a1059f68097..8b720b350a5 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -2726,9 +2726,6 @@ bool subselect_union_engine::no_rows() void subselect_uniquesubquery_engine::cleanup() { DBUG_ENTER("subselect_uniquesubquery_engine::cleanup"); - /* Tell handler we don't need the index anymore */ - if (tab->table->file && tab->table->file->inited) - tab->table->file->ha_index_end(); DBUG_VOID_RETURN; } diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 1049fc93d01..a29b6f90be0 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -15116,7 +15116,6 @@ free_tmp_table(THD *thd, TABLE *entry) else entry->file->ha_delete_table(entry->s->table_name.str); delete entry->file; - entry->file= 0; } /* free blobs */