[MDEV-31999] Can not XA COMMIT a recovered prepared XA transaction when autocommit off Created: 2023-08-24 Updated: 2023-08-24 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | XA |
| Affects Version/s: | 10.11.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | David Zhao | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
linux; generic |
||
| Description |
|
Can not XA COMMIT a recovered prepared XA transaction when autocommit is turned off, this is wrong, the prepared XA txn must be able to be committed regardless of autocommit or other variables except read_only. MariaDB [test]> xa start 'a'; insert into t1 values(1) ; xa end 'a';xa prepare 'a'; Query OK, 1 row affected (32.514 sec) Query OK, 0 rows affected (0.000 sec) Query OK, 0 rows affected (18.742 sec) MariaDB [test]> quit Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> xa recover;
---------
--------- MariaDB [(none)]> set autocommit=0; MariaDB [(none)]> xa recover;
---------
--------- MariaDB [(none)]> xa commit 'a'; MariaDB [(none)]> xa commit 'a'; |