Commit 103c4c49 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-633 lp:1024058 - mysqld XA crash in replication slave

initialize cache_mngr and write the Xid into binlog even
if binlog is disabled with SQL_LOG_BIN=0 or no --log-slave-updates
in the slave thread
parent 381f4709
...@@ -7460,8 +7460,9 @@ TC_LOG_BINLOG::log_and_order(THD *thd, my_xid xid, bool all, ...@@ -7460,8 +7460,9 @@ TC_LOG_BINLOG::log_and_order(THD *thd, my_xid xid, bool all,
int err; int err;
DBUG_ENTER("TC_LOG_BINLOG::log_and_order"); DBUG_ENTER("TC_LOG_BINLOG::log_and_order");
binlog_cache_mngr *cache_mngr= binlog_cache_mngr *cache_mngr= thd->binlog_setup_trx_data();
(binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); if (!cache_mngr)
DBUG_RETURN(0);
cache_mngr->using_xa= TRUE; cache_mngr->using_xa= TRUE;
cache_mngr->xa_xid= xid; cache_mngr->xa_xid= xid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment