summaryrefslogtreecommitdiff
path: root/sql/sql_admin.cc
diff options
context:
space:
mode:
authorSergei Petrunia <psergey@askmonty.org>2021-08-29 23:55:39 +0300
committerSergei Petrunia <psergey@askmonty.org>2022-01-19 18:10:09 +0300
commita93b3778639056806c8118fb311b335b4c074471 (patch)
tree8bab4adbf1a3452e38c5a8202ece80dec5bd20e5 /sql/sql_admin.cc
parent032587e2dcf1dc1543257847588643da0ac4dc45 (diff)
downloadmariadb-git-a93b3778639056806c8118fb311b335b4c074471.tar.gz
Fix histogram memory management
There are "local" histograms that are allocated by one thread for one TABLE object, and "global" that are allocated for TABLE_SHARE.
Diffstat (limited to 'sql/sql_admin.cc')
-rw-r--r--sql/sql_admin.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc
index 26e3d67641d..f64fdbb7cb4 100644
--- a/sql/sql_admin.cc
+++ b/sql/sql_admin.cc
@@ -1045,6 +1045,7 @@ 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 (compl_result_code)
result_code= HA_ADMIN_FAILED;
else