diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-07-09 22:36:53 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-07-09 22:36:53 +0200 |
commit | e06cc1adce6c79b7803dfcf1d351b953e69c12fa (patch) | |
tree | a5ca7d88804531914aa4ccb3e0210cb553336b1b /sql/sql_statistics.h | |
parent | c3e3c78048d4f7ed373518a3b8684acc9be56b28 (diff) | |
download | mariadb-git-e06cc1adce6c79b7803dfcf1d351b953e69c12fa.tar.gz |
MDEV-4758 10.0-monty tree: ALTER TABLE CHANGE COLUMN doesn't drop EITS stats
add missing rename_column_in_stat_tables(), delete_statistics_for_column(),
delete_statistics_for_index(), rename_table_in_stat_tables() calls.
Diffstat (limited to 'sql/sql_statistics.h')
-rw-r--r-- | sql/sql_statistics.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_statistics.h b/sql/sql_statistics.h index 17f22cec4e5..2b40d56fea4 100644 --- a/sql/sql_statistics.h +++ b/sql/sql_statistics.h @@ -93,6 +93,17 @@ void set_statistics_for_table(THD *thd, TABLE *table); class Columns_statistics; class Index_statistics; +static inline +int rename_table_in_stat_tables(THD *thd, const char *db, const char *tab, + const char *new_db, const char *new_tab) +{ + LEX_STRING od= { const_cast<char*>(db), strlen(db) }; + LEX_STRING ot= { const_cast<char*>(tab), strlen(tab) }; + LEX_STRING nd= { const_cast<char*>(new_db), strlen(new_db) }; + LEX_STRING nt= { const_cast<char*>(new_tab), strlen(new_tab) }; + return rename_table_in_stat_tables(thd, &od, &ot, &nd, &nt); +} + /* Statistical data on a table */ |