[Commits] c6acdf7: MDEV-7203: replicate_events_marked_for_skip didn't work on Galera cluster

Nirbhay Choubey nirbhay at mariadb.com
Fri Mar 6 20:19:49 EET 2015


revision-id: c6acdf7c281f91026cfac549d718511b9ed083aa
parent(s): 6f9e33ecb020bcf3e6db246bc04a9be153c63dc4
committer: Nirbhay Choubey
branch nick: 10.0-galera
timestamp: 2015-03-06 13:19:49 -0500
message:

MDEV-7203: replicate_events_marked_for_skip didn't work on Galera cluster

OPTION_SKIP_REPLICATION flag needs to be preserved for events received
on non-originating nodes.

---
 sql/wsrep_applier.cc | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc
index 6f1ead8..f8e82f6 100644
--- a/sql/wsrep_applier.cc
+++ b/sql/wsrep_applier.cc
@@ -149,8 +149,9 @@ static wsrep_cb_status_t wsrep_apply_events(THD*        thd,
       break;
     }
 
-    thd->set_server_id(ev->server_id); // use the original server id for logging
-    thd->set_time();                // time the query
+    /* Use the original server id for logging. */
+    thd->set_server_id(ev->server_id);
+    thd->set_time();                            // time the query
     wsrep_xid_init(&thd->transaction.xid_state.xid,
                    &thd->wsrep_trx_meta.gtid.uuid,
                    thd->wsrep_trx_meta.gtid.seqno);
@@ -162,6 +163,10 @@ static wsrep_cb_status_t wsrep_apply_events(THD*        thd,
       ev->when_sec_part= hrtime_sec_part(hrtime);
     }
 
+    thd->variables.option_bits=
+      (thd->variables.option_bits & ~OPTION_SKIP_REPLICATION) |
+      (ev->flags & LOG_EVENT_SKIP_REPLICATION_F ?  OPTION_SKIP_REPLICATION : 0);
+
     ev->thd = thd;
     exec_res = ev->apply_event(thd->wsrep_rgi);
     DBUG_PRINT("info", ("exec_event result: %d", exec_res));


More information about the commits mailing list