Commit 97d2c9bf authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-9214 Server miscalculates the number of XA-capable engines

Relax the number-of-XA-engines check on recovery. Allow *more*
engines to be present than absolutely necessary, extra engines
cannot affect ACID guarantees of the recovery process.

As a bonus, 10.0->crash->10.1 upgrade won't complain about
wsrep being a new XA storge engine.
parent 392d5579
...@@ -9173,12 +9173,10 @@ int TC_LOG_MMAP::recover() ...@@ -9173,12 +9173,10 @@ int TC_LOG_MMAP::recover()
the first byte after magic signature is set to current the first byte after magic signature is set to current
number of storage engines on startup number of storage engines on startup
*/ */
if (data[sizeof(tc_log_magic)] != total_ha_2pc) if (data[sizeof(tc_log_magic)] > total_ha_2pc)
{ {
sql_print_error("Recovery failed! You must enable " sql_print_error("Recovery failed! You must enable "
"exactly %d storage engines that support " "all engines that were enabled at the moment of the crash");
"two-phase commit protocol",
data[sizeof(tc_log_magic)]);
goto err1; goto err1;
} }
......
#
# MDEV-9214 Server miscalculates the number of XA-capable engines
#
--source include/have_xtradb.inc
select 1;
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 0
--source include/wait_until_disconnected.inc
--exec echo "restart:--enable-tokudb" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
select 1;
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