summaryrefslogtreecommitdiff
path: root/sql/sql_statistics.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-06-28 22:01:55 +0200
committerSergei Golubchik <serg@mariadb.org>2016-06-28 22:01:55 +0200
commit3361aee591b1eb8c676f60887ffc535cd509890a (patch)
tree54a65f83ba7d9293e6f8e8281ad920fbae6eb823 /sql/sql_statistics.cc
parent6ce20fb2b9fe57330c797694b9dbea4028f40d7c (diff)
parent0fdb17e6c3f50ae22eb97b6363bcbd8b0cd9e040 (diff)
downloadmariadb-git-3361aee591b1eb8c676f60887ffc535cd509890a.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/sql_statistics.cc')
-rw-r--r--sql/sql_statistics.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_statistics.cc b/sql/sql_statistics.cc
index 28e76ae43f1..4020cbc70c4 100644
--- a/sql/sql_statistics.cc
+++ b/sql/sql_statistics.cc
@@ -29,6 +29,7 @@
#include "sql_statistics.h"
#include "opt_range.h"
#include "my_atomic.h"
+#include "sql_show.h"
/*
The system variable 'use_stat_tables' can take one of the
@@ -3193,6 +3194,10 @@ int delete_statistics_for_table(THD *thd, LEX_STRING *db, LEX_STRING *tab)
rc= 1;
}
+ err= del_global_table_stat(thd, db, tab);
+ if (err & !rc)
+ rc= 1;
+
thd->restore_stmt_binlog_format(save_binlog_format);
close_system_tables(thd, &open_tables_backup);
@@ -3339,6 +3344,10 @@ int delete_statistics_for_index(THD *thd, TABLE *tab, KEY *key_info,
}
}
+ err= del_global_index_stat(thd, tab, key_info);
+ if (err && !rc)
+ rc= 1;
+
thd->restore_stmt_binlog_format(save_binlog_format);
close_system_tables(thd, &open_tables_backup);