diff options
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r-- | sql/sql_admin.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 205621c6f9f..5c400e44bc7 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -261,7 +261,10 @@ static int prepare_for_repair(THD *thd, TABLE_LIST *table_list, end: thd->locked_tables_list.unlink_all_closed_tables(thd, NULL, 0); if (table == &tmp_table) - closefrm(table, 1); // Free allocated memory + { + closefrm(table); + tdc_release_share(table->s); + } /* In case of a temporary table there will be no metadata lock. */ if (error && has_mdl_lock) thd->mdl_context.release_transactional_locks(); |