summaryrefslogtreecommitdiff
path: root/sql/sql_admin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r--sql/sql_admin.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 26e3d67641d..028838b65e4 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -1045,6 +1045,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
else
compl_result_code= HA_ADMIN_FAILED;
+ if (table->table)
+ free_statistics_for_table(thd, table->table);
if (compl_result_code)
result_code= HA_ADMIN_FAILED;
else