summaryrefslogtreecommitdiff
path: root/sql/sql_admin.cc
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2021-09-04 23:17:39 +0300
committerSergei Petrunia <psergey@askmonty.org>2022-01-19 18:10:10 +0300
commit223fa6a8910a2001d542eb52b51b08bd5ce0d35e (patch)
treef2e903b8e851311da2634ea5d4b5f738df582714 /sql/sql_admin.cc
parente0f42d32e5604692c1900145fa8224460d0a28ea (diff)
downloadmariadb-git-223fa6a8910a2001d542eb52b51b08bd5ce0d35e.tar.gz
Make tests pass
- Fix bad tests in statistics_json test: make them meaningful and make them work on windows - Fix analyze_debug.test: correctly handle errors during ANALYZE
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 f64fdbb7cb4..028838b65e4 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