summaryrefslogtreecommitdiff
path: root/sql/lock.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/lock.cc')
-rw-r--r--sql/lock.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/lock.cc b/sql/lock.cc
index d62a8d49979..f6cdd40fa0b 100644
--- a/sql/lock.cc
+++ b/sql/lock.cc
@@ -1124,21 +1124,22 @@ void Global_read_lock::unlock_global_read_lock(THD *thd)
thd->mdl_context.release_lock(m_mdl_global_read_lock);
#ifdef WITH_WSREP
- if (m_state == GRL_ACQUIRED_AND_BLOCKS_COMMIT)
+ if (m_state == GRL_ACQUIRED_AND_BLOCKS_COMMIT &&
+ wsrep_locked_seqno != WSREP_SEQNO_UNDEFINED)
{
Wsrep_server_state& server_state= Wsrep_server_state::instance();
if (server_state.state() == Wsrep_server_state::s_donor ||
(WSREP_NNULL(thd) &&
server_state.state() != Wsrep_server_state::s_synced))
{
- /* TODO: maybe redundant here?: */
- wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
server_state.resume();
+ wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
}
else if (WSREP_NNULL(thd) &&
server_state.state() == Wsrep_server_state::s_synced)
{
server_state.resume_and_resync();
+ wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED;
}
}
#endif /* WITH_WSREP */