While integrating TokuDB into MySQL 5.6, we found that MySQL 5.6 does not support more than one XA storage engine. For example, there is an assert in the ha_recover function that fires when the total number of XA storage engines is greater than one. After disabling this assert, we found lots of bugs in the MySQL 5.6 implementation of the TC_LOG_MMAP class, which is used when running with the binlog turned off.
There are two alternatives that we know of to fix this problem in MySQL 5.6:
- First, we could merge code from MariaDB 5.5 into MySQL 5.6. The advantage of this approach is that we have been running this code with TokuDB in MariaDB 5.5 for a long time, so we have confidence in its correctness.
- Second, we found that MySQL 5.7.2 has made changes to allow multiple XA storage engines. This is great news for TokuDB since we have one less MySQL patch to worry about. Our simple scan of the MySQL 5.7 source showed only one XA storage engine – InnoDB. This brings up two important questions. (1) What are the other XA storage engines in MySQL 5.7? and (2) How did this feature get tested?