-
-
Save ronin13/ee60ccbec4893b8fc1e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== modified file 'Percona-Server/sql/lock.cc' | |
--- Percona-Server/sql/lock.cc 2012-11-26 13:57:13 +0000 | |
+++ Percona-Server/sql/lock.cc 2013-04-20 05:19:27 +0000 | |
@@ -1085,19 +1085,22 @@ | |
m_state= GRL_ACQUIRED_AND_BLOCKS_COMMIT; | |
#ifdef WITH_WSREP | |
- long long ret = wsrep->pause(wsrep); | |
- if (ret >= 0) | |
- { | |
- wsrep_locked_seqno= ret; | |
- } | |
- else if (ret != -ENOSYS) /* -ENOSYS - no provider */ | |
- { | |
- WSREP_ERROR("Failed to pause provider: %lld (%s)", -ret, strerror(-ret)); | |
+ /* Pause the provider given that it is not paused already */ | |
+ if (wsrep_locked_seqno == WSREP_SEQNO_UNDEFINED) { | |
+ long long ret = wsrep->pause(wsrep); | |
+ if (ret >= 0) | |
+ { | |
+ wsrep_locked_seqno= ret; | |
+ } | |
+ else if (ret != -ENOSYS) /* -ENOSYS - no provider */ | |
+ { | |
+ WSREP_ERROR("Failed to pause provider: %lld (%s)", -ret, strerror(-ret)); | |
- /* m_mdl_blocks_commits_lock is always NULL here */ | |
- wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED; | |
- my_error(ER_LOCK_DEADLOCK, MYF(0)); | |
- DBUG_RETURN(TRUE); | |
+ /* m_mdl_blocks_commits_lock is always NULL here */ | |
+ wsrep_locked_seqno= WSREP_SEQNO_UNDEFINED; | |
+ my_error(ER_LOCK_DEADLOCK, MYF(0)); | |
+ DBUG_RETURN(TRUE); | |
+ } | |
} | |
#endif /* WITH_WSREP */ | |
DBUG_RETURN(FALSE); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment