diff options
author | Sergei Golubchik <serg@mariadb.org> | 2014-08-25 19:08:01 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2014-10-11 18:53:04 +0200 |
commit | db8af31831beb949dfcf7675b3c6392dc52dc38c (patch) | |
tree | 875eb553866accbb0f05bfe8cbe3a789752d86f2 /sql/sql_reload.cc | |
parent | 932eaf31e91cf875e336b8d9332682aca03c6e58 (diff) | |
download | mariadb-git-db8af31831beb949dfcf7675b3c6392dc52dc38c.tar.gz |
SHOW and FLUSH for I_S tables.
Extend existing plugins to support
* SHOW QUERY_RESPONSE_TIME
* FLUSH QUERY_RESPONSE_TIME
* SHOW LOCALE
move userstat tables to use the new API instead of
hand-coded syntax
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r-- | sql/sql_reload.cc | 41 |
1 files changed, 12 insertions, 29 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index 91d412a0c39..24e5d053145 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -25,6 +25,7 @@ #include "hostname.h" // hostname_cache_refresh #include "sql_repl.h" // reset_master, reset_slave #include "rpl_mi.h" // Master_info::data_lock +#include "sql_show.h" #include "debug_sync.h" #include "rpl_mi.h" @@ -377,35 +378,17 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, #endif if (options & REFRESH_USER_RESOURCES) reset_mqh((LEX_USER *) NULL, 0); /* purecov: inspected */ - if (options & REFRESH_TABLE_STATS) - { - mysql_mutex_lock(&LOCK_global_table_stats); - free_global_table_stats(); - init_global_table_stats(); - mysql_mutex_unlock(&LOCK_global_table_stats); - } - if (options & REFRESH_INDEX_STATS) - { - mysql_mutex_lock(&LOCK_global_index_stats); - free_global_index_stats(); - init_global_index_stats(); - mysql_mutex_unlock(&LOCK_global_index_stats); - } - if (options & (REFRESH_USER_STATS | REFRESH_CLIENT_STATS)) - { - mysql_mutex_lock(&LOCK_global_user_client_stats); - if (options & REFRESH_USER_STATS) - { - free_global_user_stats(); - init_global_user_stats(); - } - if (options & REFRESH_CLIENT_STATS) - { - free_global_client_stats(); - init_global_client_stats(); - } - mysql_mutex_unlock(&LOCK_global_user_client_stats); - } + if (options & REFRESH_GENERIC) + { + List_iterator_fast<LEX_STRING> li(thd->lex->view_list); + LEX_STRING *ls; + while ((ls= li++)) + { + ST_SCHEMA_TABLE *table= find_schema_table(thd, ls->str); + if (table->reset_table()) + result= 1; + } + } if (*write_to_binlog != -1) *write_to_binlog= tmp_write_to_binlog; /* |