From 6a614d6934a85e8228957fe1d7242928a00dc5ff Mon Sep 17 00:00:00 2001 From: mkaruza Date: Wed, 21 Oct 2020 09:48:52 +0200 Subject: MDEV-22707: galera got stuck after flush tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deadlock is possible between applier thread and local committing thread with active FLUSH TABLE. Applier thread should skip table share checks and locks when opening table. Reviewed-by: Jan Lindström --- sql/sql_base.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sql/sql_base.cc') diff --git a/sql/sql_base.cc b/sql/sql_base.cc index cc77b58cb3e..497c6a0322f 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1859,7 +1859,12 @@ retry_share: DBUG_RETURN(FALSE); } +#ifdef WITH_WSREP + if (!((flags & MYSQL_OPEN_IGNORE_FLUSH) || + (wsrep_on(thd) && thd->wsrep_applier))) +#else if (!(flags & MYSQL_OPEN_IGNORE_FLUSH)) +#endif { if (share->tdc->flushed) { -- cgit v1.2.1