diff options
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r-- | sql/sql_reload.cc | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index 961f31eb728..f276a6d0f21 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -329,25 +329,21 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, } #ifdef WITH_WSREP - if (thd && thd->wsrep_applier) + /* In case of applier thread, do not call flush tables */ + if (!thd || !thd->wsrep_applier) +#endif /* WITH_WSREP */ { - /* - In case of applier thread, do not wait for table share(s) to be - removed from table definition cache. - */ - options|= REFRESH_FAST; - } -#endif - if (close_cached_tables(thd, tables, - ((options & REFRESH_FAST) ? FALSE : TRUE), - (thd ? thd->variables.lock_wait_timeout : - LONG_TIMEOUT))) - { - /* - NOTE: my_error() has been already called by reopen_tables() within - close_cached_tables(). - */ - result= 1; + if (close_cached_tables(thd, tables, + ((options & REFRESH_FAST) ? FALSE : TRUE), + (thd ? thd->variables.lock_wait_timeout : + LONG_TIMEOUT))) + { + /* + NOTE: my_error() has been already called by reopen_tables() within + close_cached_tables(). + */ + result= 1; + } } } my_dbopt_cleanup(); |