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.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 00d7e5efecd..465145cf25f 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -659,8 +659,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
protocol->store(operator_name, system_charset_info);
protocol->store(&error_clex_str, system_charset_info);
length= my_snprintf(buff, sizeof(buff),
- ER_THD(thd, ER_DROP_PARTITION_NON_EXISTENT),
- table_name.str);
+ ER_THD(thd, ER_PARTITION_DOES_NOT_EXIST));
protocol->store(buff, length, system_charset_info);
if(protocol->write())
goto err;
@@ -993,6 +992,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