| 1 |
--source include/have_innodb.inc |
| 2 |
--source include/have_partition.inc |
| 3 |
|
| 4 |
--echo # |
| 5 |
--echo # MDEV-14693 XA: Assertion `!clust_index->online_log' failed |
| 6 |
--echo # in rollback_inplace_alter_table |
| 7 |
--echo # |
| 8 |
|
| 9 |
# A bug in meta-data locking (MDL) for XA transactions causes |
| 10 |
# a bug in InnoDB error handling for ALTER TABLE to be triggered. |
| 11 |
CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB PARTITION BY HASH(a) PARTITIONS 2; |
| 12 |
XA START 'xid'; |
| 13 |
INSERT INTO t1 VALUES (1,10); |
| 14 |
# XA bug: The following releases the MDL on t1! |
| 15 |
--error ER_XAER_RMFAIL |
| 16 |
CREATE DATABASE IF NOT EXISTS db; |
| 17 |
|
| 18 |
--connect (con1,localhost,root,,test) |
| 19 |
SET innodb_lock_wait_timeout= 1, lock_wait_timeout= 2; |
| 20 |
# Here, innodb_lock_wait_timeout would be exceeded, causing the operation |
| 21 |
# to roll back when InnoDB is attempting to commit. |
| 22 |
# (Instead, lock_wait_timeout should be exceeded!) |
| 23 |
--error ER_LOCK_WAIT_TIMEOUT |
| 24 |
ALTER TABLE t1 FORCE; |
| 25 |
|
| 26 |
# Cleanup |
| 27 |
--disconnect con1 |
| 28 |
--connection default |
| 29 |
XA END 'xid'; |
| 30 |
XA ROLLBACK 'xid'; |
| 31 |
DROP TABLE t1; |