From aa7e3461c80fa7786ff45ba41725342a5e213c0a Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Thu, 7 Apr 2016 11:33:17 +0300 Subject: [PATCH] Fixed event position updating The position of the next event to be written was used as the position of the current event. This caused the checks for the position of the current safe event to fail and the non-transaction safe version was used. This only happened with events that are not done inside a transaction i.e. DDL statements. --- server/modules/routing/binlog/blr_master.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/modules/routing/binlog/blr_master.c b/server/modules/routing/binlog/blr_master.c index 310b1efab..af9e34018 100644 --- a/server/modules/routing/binlog/blr_master.c +++ b/server/modules/routing/binlog/blr_master.c @@ -1466,9 +1466,8 @@ blr_handle_binlog_record(ROUTER_INSTANCE *router, GWBUF *pkt) if (router->trx_safe == 0 || (router->trx_safe && router->pending_transaction == 0)) { - router->binlog_position = router->current_pos; - router->current_safe_event = router->current_pos; + router->current_safe_event = router->last_event_pos; spinlock_release(&router->binlog_lock);