List:Internals« Previous MessageNext Message »
From:Rich Prohaska Date:August 21 2012 5:05pm
Subject:Multiple XA storage engines and 5.6.6-m9
View as plain text  
Hello,

TokuDB is a MySQL storage engine that implements XA.  Unfortunately,
MySQL 5.6.6-m9 (and prior versions) do not support multiple XA storage
engines, as described in MySQL bug #32926.  This bug report described
how to crash mysqld with the falcon and innodb storage engines.
Another way to reproduce this problem is to add a fake prepare method
to the example storage engine, install the example plugin, and run
MySQL with the binlog disabled.

It would be nice (for us) if this problem was fixed sometime prior to
the 5.6.6 GA.

We made some changes to the 5.6.6-m9 code base to support TokuDB as
another XA storage engine.

diff -r mysql-5.6.6-m9/sql/handler.cc mysql-5.6.6-m9-patched/sql/handler.cc
1824c1824
<   DBUG_ASSERT(total_ha_2pc == (ulong) opt_bin_log+1); // only InnoDB
and binlog
---
>   // DBUG_ASSERT(total_ha_2pc == (ulong) opt_bin_log+1); // only InnoDB and binlog
diff -r mysql-5.6.6-m9/sql/log.cc mysql-5.6.6-m9-patched/sql/log.cc
2512c2512
<     pg->end=(my_xid *)(pg->start + tc_log_page_size);
---
>     pg->end=(my_xid *)(data + (i+1)*tc_log_page_size);
2513a2514
>     pg->ptr=pg->start;
2774c2775,2776
<   mysql_cond_signal(&active->cond);        // wake up a new syncer
---
>   if (active)
>       mysql_cond_signal(&active->cond);        // wake up a new syncer
diff -r mysql-5.6.6-m9/storage/example/ha_example.cc
mysql-5.6.6-m9-patched/storage/example/ha_example.cc
131a132,136
> static int example_prepare(handlerton *hton, THD *thd, bool all)
> {
>   DBUG_ENTER("example_prepare");
>   DBUG_RETURN(EINVAL);
> }
146a152
>   example_hton->prepare= example_prepare;
Thread
Multiple XA storage engines and 5.6.6-m9Rich Prohaska21 Aug