Bug #71352 | xa start with the exist xid, and then xa commit with the xid will failed | ||
---|---|---|---|
Submitted: | 12 Jan 2014 4:03 | Modified: | 20 May 2014 0:34 |
Reporter: | HongXiang Jiang (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: XA transactions | Severity: | S3 (Non-critical) |
Version: | 5.5.35, 5.6.14 | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | server crash, xa start |
[12 Jan 2014 4:03]
HongXiang Jiang
[13 Jan 2014 9:44]
MySQL Verification Team
Hello Boyce, Thank you for the bug report and test case. Verified as described. Thanks, Umesh
[13 Jan 2014 9:50]
MySQL Verification Team
// 5.5.35 mysql> select version(); +------------------+ | version() | +------------------+ | 5.5.35-debug-log | +------------------+ 1 row in set (0.00 sec) mysql> mysql> create table t(id int)engine=innodb; Query OK, 0 rows affected (0.04 sec) mysql> xa start '111'; Query OK, 0 rows affected (0.00 sec) mysql> insert into t values(1); Query OK, 1 row affected (0.00 sec) mysql> xa end '111'; Query OK, 0 rows affected (0.00 sec) mysql> xa prepare '111'; Query OK, 0 rows affected (0.00 sec) mysql> xa recover; +----------+--------------+--------------+------+ | formatID | gtrid_length | bqual_length | data | +----------+--------------+--------------+------+ | 1 | 3 | 0 | 111 | +----------+--------------+--------------+------+ 1 row in set (0.00 sec) // Killed mysqld from other session mysql> mysql> xa start '111'; ERROR 1440 (XAE08): XAER_DUPID: The XID already exists mysql> xa recover; +----------+--------------+--------------+------+ | formatID | gtrid_length | bqual_length | data | +----------+--------------+--------------+------+ | 1 | 3 | 0 | 111 | +----------+--------------+--------------+------+ 1 row in set (0.00 sec) mysql> xa commit '111'; ERROR 1399 (XAE07): XAER_RMFAIL: The command cannot be executed when global transaction is in the NON-EXISTING state mysql> xa rollback '111'; ERROR 1399 (XAE07): XAER_RMFAIL: The command cannot be executed when global transaction is in the NON-EXISTING state
[20 May 2014 0:34]
Paul DuBois
Noted in 5.7.5 changelog. XA START after a server restart with the exising XID followed by XA COMMIT failed to commit.