diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-03-05 14:14:00 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2015-03-05 14:14:00 -0500 |
commit | 9af42db6138a555454b7631761b81f8d259f014e (patch) | |
tree | ff1ff849521a70cd25251e661d1eb8ee960e587f /sql/wsrep_applier.cc | |
parent | 73a143ab34be0007cc0fc17cf5fda00fef063c1c (diff) | |
download | mariadb-git-9af42db6138a555454b7631761b81f8d259f014e.tar.gz |
MDEV-7192: binlog_annotate_row_events not completely compatible with galera
Annotate_rows event needs to be preserved until the last Rows event has
been applied because after it has been applied thd->query points to the
query stored inside this event.
Diffstat (limited to 'sql/wsrep_applier.cc')
-rw-r--r-- | sql/wsrep_applier.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/wsrep_applier.cc b/sql/wsrep_applier.cc index 03d356aa046..6f1ead89158 100644 --- a/sql/wsrep_applier.cc +++ b/sql/wsrep_applier.cc @@ -92,6 +92,7 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd, char *buf= (char *)events_buf; int rcode= 0; int event= 1; + Log_event_type typ; DBUG_ENTER("wsrep_apply_events"); @@ -126,7 +127,9 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd, goto error; } - switch (ev->get_type_code()) { + typ= ev->get_type_code(); + + switch (typ) { case FORMAT_DESCRIPTION_EVENT: wsrep_set_apply_format(thd, (Format_description_log_event*)ev); continue; @@ -160,7 +163,6 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd, } 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)); @@ -192,7 +194,7 @@ static wsrep_cb_status_t wsrep_apply_events(THD* thd, DBUG_RETURN(WSREP_CB_FAILURE); } - delete ev; + delete_or_keep_event_post_apply(thd->wsrep_rgi, typ, ev); } error: |