Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
104 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # | ||
| # MDEV-14693 XA: Assertion `!clust_index->online_log' failed | ||
| # in rollback_inplace_alter_table | ||
| # | ||
| CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB PARTITION BY HASH(a) PARTITIONS 2; | ||
| XA START 'xid'; | ||
| INSERT INTO t1 VALUES (1,10); | ||
| CREATE DATABASE IF NOT EXISTS db; | ||
| ERROR XAE07: XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state | ||
| SET innodb_lock_wait_timeout= 1, lock_wait_timeout= 2; | ||
| ALTER TABLE t1 FORCE; | ||
| ERROR HY000: Lock wait timeout exceeded; try restarting transaction | ||
| XA END 'xid'; | ||
| XA ROLLBACK 'xid'; | ||
| DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| --source include/have_innodb.inc | ||
| --source include/have_partition.inc | ||
|
|
||
| --echo # | ||
| --echo # MDEV-14693 XA: Assertion `!clust_index->online_log' failed | ||
| --echo # in rollback_inplace_alter_table | ||
| --echo # | ||
|
|
||
| # A bug in meta-data locking (MDL) for XA transactions causes | ||
| # a bug in InnoDB error handling for ALTER TABLE to be triggered. | ||
| CREATE TABLE t1 (a INT, b INT) ENGINE=InnoDB PARTITION BY HASH(a) PARTITIONS 2; | ||
| XA START 'xid'; | ||
| INSERT INTO t1 VALUES (1,10); | ||
| # XA bug: The following releases the MDL on t1! | ||
| --error ER_XAER_RMFAIL | ||
| CREATE DATABASE IF NOT EXISTS db; | ||
|
|
||
| --connect (con1,localhost,root,,test) | ||
| SET innodb_lock_wait_timeout= 1, lock_wait_timeout= 2; | ||
| # Here, innodb_lock_wait_timeout would be exceeded, causing the operation | ||
| # to roll back when InnoDB is attempting to commit. | ||
| # (Instead, lock_wait_timeout should be exceeded!) | ||
| --error ER_LOCK_WAIT_TIMEOUT | ||
| ALTER TABLE t1 FORCE; | ||
|
|
||
| # Cleanup | ||
| --disconnect con1 | ||
| --connection default | ||
| XA END 'xid'; | ||
| XA ROLLBACK 'xid'; | ||
| DROP TABLE t1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters