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_thd.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_thd.cc')
-rw-r--r-- | sql/wsrep_thd.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sql/wsrep_thd.cc b/sql/wsrep_thd.cc index b01737d1d5c..81999d11296 100644 --- a/sql/wsrep_thd.cc +++ b/sql/wsrep_thd.cc @@ -121,10 +121,13 @@ static rpl_group_info* wsrep_relay_group_init(const char* log_fname) */ rli->mi = new Master_info(&connection_name, false); - rli->sql_driver_thd= current_thd; - struct rpl_group_info *rgi= new rpl_group_info(rli); - rgi->thd= current_thd; + rgi->thd= rli->sql_driver_thd= current_thd; + + if ((rgi->deferred_events_collecting= rli->mi->rpl_filter->is_on())) + { + rgi->deferred_events= new Deferred_log_events(rli); + } return rgi; } @@ -172,6 +175,8 @@ static void wsrep_return_from_bf_mode(THD *thd, struct wsrep_thd_shadow* shadow) delete thd->system_thread_info.rpl_sql_info; delete thd->wsrep_rgi->rli->mi; delete thd->wsrep_rgi->rli; + + thd->wsrep_rgi->cleanup_after_session(); delete thd->wsrep_rgi; thd->wsrep_rgi = NULL; } |