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 Golubchik <serg@mariadb.org>2021-09-12 15:30:42 +0200
commitd7cab0532537187268f0a51e3a4eba15218ec9f5 (patch)
tree6a9ced2e763e0f6d3f4b677a40021362c3a85a11 /sql/sql_admin.cc
parent18ec7276e67b99de87a174f8d6ed3866ade17ca6 (diff)
downloadmariadb-git-preview-10.7-MDEV-21130-json-histograms.tar.gz
- 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 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