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

Nirbhay Choubey nirbhay at mariadb.com
Thu Mar 5 04:21:31 EET 2015


revision-id: d59fe74a87fa328d4daa2a9389e33e2611117b97
parent(s): aa2904a7f4014cd4790086a2512dc39b533b2a8a
committer: Nirbhay Choubey
branch nick: 10.0-galera-b7203
timestamp: 2015-03-04 21:21:30 -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 | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc
index 03d356a..04e6130 100644
--- a/sql/wsrep_applier.cc
+++ b/sql/wsrep_applier.cc
@@ -146,8 +146,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);
@@ -159,8 +160,11 @@ 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_rli);
     exec_res = ev->apply_event(thd->wsrep_rgi);
     DBUG_PRINT("info", ("exec_event result: %d", exec_res));
 


More information about the commits mailing list