Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
1.5.4
-
None
Description
By my testing I spotted fact that calling prepare on MaridaDB XAResource throws XAException.XAER_RMFAIL when provided uknown Xid instead of XAException.XAER_NOTA as xa specification denotes.
[XAER_NOTA]
The specified XID is not known by the resource manager
Sorry for late answer.
MariaDB error code (https://mariadb.com/kb/en/library/mariadb-error-codes/) :
1397 XAE04 ER_XAER_NOTA XAER_NOTA: Unknown XID
1398 XAE05 ER_XAER_INVAL XAER_INVAL: Invalid arguments (or unsupported command)
1399 XAE07 ER_XAER_RMFAIL XAER_RMFAIL: The command cannot be executed when global transaction is in the %s state
Connector implementation :
I fail to reproduce this error and don't see how this is possible: if MariaDB server return "Unknown XID" message, error code 1397 is obligatory associate. association error code to xa error is done by this code: https://github.com/MariaDB/mariadb-connector-j/blob/master/src/main/java/org/mariadb/jdbc/MariaXaResource.java#L97