mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
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.
This commit is contained in:
@@ -149,8 +149,9 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
thd->set_server_id(ev->server_id); // use the original server id for logging
|
/* Use the original server id for logging. */
|
||||||
thd->set_time(); // time the query
|
thd->set_server_id(ev->server_id);
|
||||||
|
thd->set_time(); // time the query
|
||||||
wsrep_xid_init(&thd->transaction.xid_state.xid,
|
wsrep_xid_init(&thd->transaction.xid_state.xid,
|
||||||
&thd->wsrep_trx_meta.gtid.uuid,
|
&thd->wsrep_trx_meta.gtid.uuid,
|
||||||
thd->wsrep_trx_meta.gtid.seqno);
|
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);
|
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;
|
ev->thd = thd;
|
||||||
exec_res = ev->apply_event(thd->wsrep_rgi);
|
exec_res = ev->apply_event(thd->wsrep_rgi);
|
||||||
DBUG_PRINT("info", ("exec_event result: %d", exec_res));
|
DBUG_PRINT("info", ("exec_event result: %d", exec_res));
|
||||||
|
Reference in New Issue
Block a user