summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorsjaakola <seppo.jaakola@iki.fi>2016-02-15 23:33:55 +0200
committerNirbhay Choubey <nirbhay@mariadb.com>2016-02-17 16:02:57 -0500
commit4bdf0258b6119e6464ed7846e7e4f866dd9f9ed9 (patch)
tree35d8037b841e1acfec84245cf1c0d38be1c163e3 /sql
parent89a264809d660fb5a4e7d43e9324b1f529a3a1d7 (diff)
downloadmariadb-git-4bdf0258b6119e6464ed7846e7e4f866dd9f9ed9.tar.gz
refs MW-246
- skipping desync and resync before and after DDL execution in RSU mode, if wsrep_desync is set upfront
Diffstat (limited to 'sql')
-rw-r--r--sql/wsrep_mysqld.cc48
1 files changed, 28 insertions, 20 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 31a642e3624..e622389de7e 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -1303,16 +1303,19 @@ static int wsrep_RSU_begin(THD *thd, char *db_, char *table_)
WSREP_DEBUG("RSU BEGIN: %lld, %d : %s", (long long)wsrep_thd_trx_seqno(thd),
thd->wsrep_exec_mode, thd->query() );
- ret = wsrep->desync(wsrep);
- if (ret != WSREP_OK)
+ if (!wsrep_desync)
{
- WSREP_WARN("RSU desync failed %d for schema: %s, query: %s",
- ret,
- (thd->db ? thd->db : "(null)"),
- thd->query());
- my_error(ER_LOCK_DEADLOCK, MYF(0));
- return(ret);
+ ret = wsrep->desync(wsrep);
+ if (ret != WSREP_OK)
+ {
+ WSREP_WARN("RSU desync failed %d for schema: %s, query: %s",
+ ret, (thd->db ? thd->db : "(null)"), thd->query());
+ my_error(ER_LOCK_DEADLOCK, MYF(0));
+ return(ret);
+ }
}
+ else
+ WSREP_DEBUG("RSU desync skipped: %d", wsrep_desync);
mysql_mutex_lock(&LOCK_wsrep_replaying);
wsrep_replaying++;
mysql_mutex_unlock(&LOCK_wsrep_replaying);
@@ -1327,13 +1330,14 @@ static int wsrep_RSU_begin(THD *thd, char *db_, char *table_)
wsrep_replaying--;
mysql_mutex_unlock(&LOCK_wsrep_replaying);
- ret = wsrep->resync(wsrep);
- if (ret != WSREP_OK)
+ if (!wsrep_desync)
{
- WSREP_WARN("resync failed %d for schema: %s, query: %s",
- ret,
- (thd->db ? thd->db : "(null)"),
- thd->query());
+ ret = wsrep->resync(wsrep);
+ if (ret != WSREP_OK)
+ {
+ WSREP_WARN("resync failed %d for schema: %s, query: %s",
+ ret, (thd->db ? thd->db : "(null)"), thd->query());
+ }
}
my_error(ER_LOCK_DEADLOCK, MYF(0));
return(1);
@@ -1370,14 +1374,18 @@ static void wsrep_RSU_end(THD *thd)
(thd->db ? thd->db : "(null)"),
thd->query());
}
- ret = wsrep->resync(wsrep);
- if (ret != WSREP_OK)
+ if (!wsrep_desync)
{
- WSREP_WARN("resync failed %d for schema: %s, query: %s", ret,
- (thd->db ? thd->db : "(null)"),
- thd->query());
- return;
+ ret = wsrep->resync(wsrep);
+ if (ret != WSREP_OK)
+ {
+ WSREP_WARN("resync failed %d for schema: %s, query: %s", ret,
+ (thd->db ? thd->db : "(null)"), thd->query());
+ return;
+ }
}
+ else
+ WSREP_DEBUG("RSU resync skipped: %d", wsrep_desync);
thd->variables.wsrep_on = 1;
}