#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);
I tested with this patch: https:/ /gist.github. com/ronin13/ ee60ccbec4893b8 fc1e1
It seems to be working.
Patch: Server/ sql/lock. cc' Server/ sql/lock. cc 2012-11-26 13:57:13 +0000 Server/ sql/lock. cc 2013-04-20 05:19:27 +0000 AND_BLOCKS_ COMMIT;
=== modified file 'Percona-
--- Percona-
+++ Percona-
@@ -1085,19 +1085,22 @@
m_state= GRL_ACQUIRED_
#ifdef WITH_WSREP pause(wsrep) ; UNDEFINED) { pause(wsrep) ;
- long long ret = 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_
+ long long ret = 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 */ UNDEFINED; ER_LOCK_ DEADLOCK, MYF(0)); commits_ lock is always NULL here */ UNDEFINED; ER_LOCK_ DEADLOCK, MYF(0)); RETURN( FALSE);
- wsrep_locked_seqno= WSREP_SEQNO_
- my_error(
- DBUG_RETURN(TRUE);
+ /* m_mdl_blocks_
+ wsrep_locked_seqno= WSREP_SEQNO_
+ my_error(
+ DBUG_RETURN(TRUE);
+ }
}
#endif /* WITH_WSREP */
DBUG_