Re: crash in slave replication with XA transaction

Mats Kindahl <[email protected]> Mon, 04 Jun 2012 22:05:25 +0200
Newsgroups gmane.comp.db.mysql.devel
Message-ID <[email protected]>

On 06/04/2012 07:23 PM, Rich Prohaska wrote:
> Hello,
>
> We are running MySQL 5.5.21 with both InnoDB and TokuDB as XA storage
> engines.  When one runs a transaction that inserts into an InnoDB
> table and a TokuDB table, the commit crashes the replication slave at
> log.cc line 6602 because cache_mngr == NULL.  We found a pattern in
> various log functions in log.cc that calls binlog_setup_trx_data to
> initialize the txn state.
>
> This change fixes our immediate problem.
>
> $ diff log.cc.orig log.cc
> 6595a6596,6597
>>   if (thd_get_ha_data(thd, binlog_hton) == NULL)
>>     thd->binlog_setup_trx_data();
> Is this a correct fix?  If so, are there other places that need a
> similar change?

Should work, but you can just as well do the setup inside thd_get_ha_data().

/Matz

>
> Thanks
> Rich Prohaska
>
>
> The transaction is:
> create table t1 (a int primary key) engine=innodb;
> create table t2 (a int primary key) engine=tokudb;
> set autocommit=0;
> insert into t1 values (1);
> insert into t2 values (2);
> commit;
>
> the slave crashes while handling the commit binlog entry.
>

-- 
Senior Principal Software Developer
Oracle, MySQL Department


-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals