Skip to content

Commit 97d2c9b

Browse files
committed
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.
1 parent 392d557 commit 97d2c9b

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

sql/log.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9173,12 +9173,10 @@ int TC_LOG_MMAP::recover()
91739173
the first byte after magic signature is set to current
91749174
number of storage engines on startup
91759175
*/
9176-
if (data[sizeof(tc_log_magic)] != total_ha_2pc)
9176+
if (data[sizeof(tc_log_magic)] > total_ha_2pc)
91779177
{
91789178
sql_print_error("Recovery failed! You must enable "
9179-
"exactly %d storage engines that support "
9180-
"two-phase commit protocol",
9181-
data[sizeof(tc_log_magic)]);
9179+
"all engines that were enabled at the moment of the crash");
91829180
goto err1;
91839181
}
91849182

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
select 1;
2+
1
3+
1
4+
select 1;
5+
1
6+
1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--disable-tokudb
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#
2+
# MDEV-9214 Server miscalculates the number of XA-capable engines
3+
#
4+
--source include/have_xtradb.inc
5+
6+
select 1;
7+
8+
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
9+
--shutdown_server 0
10+
--source include/wait_until_disconnected.inc
11+
12+
--exec echo "restart:--enable-tokudb" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
13+
--enable_reconnect
14+
--source include/wait_until_connected_again.inc
15+
16+
select 1;

0 commit comments

Comments
 (0)