summaryrefslogtreecommitdiff
path: root/sql/sql_reload.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r--sql/sql_reload.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc
index bb3d5bb899a..f1f9ba9452f 100644
--- a/sql/sql_reload.cc
+++ b/sql/sql_reload.cc
@@ -253,7 +253,18 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options,
}
if (options & REFRESH_CHECKPOINT)
disable_checkpoints(thd);
- }
+#ifdef WITH_WSREP
+ /*
+ We need to do it second time after wsrep appliers were blocked in
+ make_global_read_lock_block_commit(thd) above since they could have
+ modified the tables too.
+ */
+ if (WSREP(thd) &&
+ close_cached_tables(thd, tables, (options & REFRESH_FAST) ?
+ FALSE : TRUE, TRUE))
+ result= 1;
+#endif /* WITH_WSREP */
+ }
else
{
if (thd && thd->locked_tables_mode)