diff options
author | Seppo Jaakola <seppo.jaakola@codership.com> | 2012-10-23 22:38:11 +0300 |
---|---|---|
committer | Seppo Jaakola <seppo.jaakola@codership.com> | 2012-10-23 22:38:11 +0300 |
commit | ef6f9a8250804efb047ad6f28e476c59d7223e85 (patch) | |
tree | 4dca03b7badc2e826110921392fb351fd07e80a3 /sql/slave.cc | |
parent | 20df56c1002e809daa68fa7431a9dd7e3d899642 (diff) | |
download | mariadb-git-ef6f9a8250804efb047ad6f28e476c59d7223e85.tar.gz |
References lp:1066784
merged with patch: bzr diff lp:codership-mysql/5.5 -r3795..3809
Diffstat (limited to 'sql/slave.cc')
-rw-r--r-- | sql/slave.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/slave.cc b/sql/slave.cc index fe3ce480367..b928b658f51 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2600,6 +2600,23 @@ int apply_event_and_update_pos(Log_event* ev, THD* thd, Relay_log_info* rli) ev->thd = thd; // because up to this point, ev->thd == 0 int reason= ev->shall_skip(rli); +#ifdef WITH_WSREP + if (ev->get_type_code() == XID_EVENT || + (ev->get_type_code() == QUERY_EVENT && thd->wsrep_mysql_replicated > 0 && + (!strncasecmp(((Query_log_event*)ev)->query , "BEGIN", 5) || + !strncasecmp(((Query_log_event*)ev)->query , "COMMIT", 6) ))) + { + if (++thd->wsrep_mysql_replicated < (int)wsrep_mysql_replication_bundle) + { + WSREP_DEBUG("skipping wsrep commit %d", thd->wsrep_mysql_replicated); + reason = Log_event::EVENT_SKIP_IGNORE; + } + else + { + thd->wsrep_mysql_replicated = 0; + } + } +#endif if (reason == Log_event::EVENT_SKIP_COUNT) sql_slave_skip_counter= --rli->slave_skip_counter; mysql_mutex_unlock(&rli->data_lock); |