diff options
author | sjaakola <seppo.jaakola@iki.fi> | 2016-03-01 10:56:21 +0200 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2016-08-21 16:17:02 -0400 |
commit | a03c45fa980ab170cd509d10923916aa9d9c4f86 (patch) | |
tree | 3ecb87561f2e8c38893344c8a97b093e5bd1106e /sql/lock.cc | |
parent | 8ec50ebda3c558e34f263c08b2661929f0bdad2d (diff) | |
download | mariadb-git-a03c45fa980ab170cd509d10923916aa9d9c4f86.tar.gz |
Refs: MW-252
- if wsrep_on==OFF, unlock tables would resume provider even though it was not passed
in FTWRL processing. This is fixed in this patch.
Diffstat (limited to 'sql/lock.cc')
-rw-r--r-- | sql/lock.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sql/lock.cc b/sql/lock.cc index 8c426deda17..fea28753739 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -1069,16 +1069,19 @@ void Global_read_lock::unlock_global_read_lock(THD *thd) thd->mdl_context.release_lock(m_mdl_blocks_commits_lock); m_mdl_blocks_commits_lock= NULL; #ifdef WITH_WSREP - wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED; - wsrep->resume(wsrep); - if (!wsrep_desync && !wsrep_node_is_donor()) + if (WSREP(thd) || wsrep_node_is_donor()) { - int ret = wsrep->resync(wsrep); - if (ret != WSREP_OK) + wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED; + wsrep->resume(wsrep); + if (!wsrep_desync && !wsrep_node_is_donor()) { - WSREP_WARN("resync failed %d for FTWRL: db: %s, query: %s", ret, - (thd->db ? thd->db : "(null)"), thd->query()); - DBUG_VOID_RETURN; + int ret = wsrep->resync(wsrep); + if (ret != WSREP_OK) + { + WSREP_WARN("resync failed %d for FTWRL: db: %s, query: %s", ret, + (thd->db ? thd->db : "(null)"), thd->query()); + DBUG_VOID_RETURN; + } } } #endif /* WITH_WSREP */ |