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.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 55cfc5d3b85..c5c9f502fc5 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -1045,7 +1045,8 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
else
compl_result_code= HA_ADMIN_FAILED;
- free_statistics_for_table(thd, table->table);
+ if (table->table)
+ free_statistics_for_table(thd, table->table);
if (compl_result_code)
result_code= HA_ADMIN_FAILED;
else