[MDEV-21854] xa commit 'xid' one phase for already prepared transaction must always error out Created: 2020-03-02  Updated: 2020-06-06  Resolved: 2020-06-06

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.5.2

Type: Bug Priority: Major
Reporter: Andrei Elkin Assignee: Andrei Elkin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
is blocked by MDEV-742 LP:803649 - Xa recovery failed on cli... Closed

 Description   

And it does so "normally":

CREATE TABLE `ti` ( `a` int(11) DEFAULT NULL) ENGINE=InnoDB;
xa start '1';
insert into ti set a=1;
xa end '1';
xa prepare '1';
--error XAER_RMFAIL
 xa commit '1' one phase;

The error is there:

ERROR 1399 (XAE07): XAER_RMFAIL: The command cannot be executed when global transaction is in the  PREPARED state

However the error is not set in the case of "foreign" xa commit, that is
when an xa transaction got prepared and later recovered (e.g after the server crash).



 Comments   
Comment by Andrei Elkin [ 2020-06-06 ]

The bug was fixed along with MDEV-742.

Generated at Thu Feb 08 09:10:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.