Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-387

Wrong XAException return code at prepare when provided uknown Xid

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 1.5.4
    • N/A
    • Other
    • 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

      Attachments

        Activity

          diego dupin Diego Dupin added a comment -

          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

          diego dupin Diego Dupin added a comment - 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

          diego+dupin hi. Thanks for looking at this. You're right. I would tip that I used a wrong configuration and I correctly got XAER_RMFAI as a wrong state for the global transaction id. I rechecked with my test and I correctly get the XAER_NOTA. Please, close this issue as rejected.
          Once again, thanks for looking into this.

          chalda Ondra Chaloupka added a comment - diego+dupin hi. Thanks for looking at this. You're right. I would tip that I used a wrong configuration and I correctly got XAER_RMFAI as a wrong state for the global transaction id. I rechecked with my test and I correctly get the XAER_NOTA . Please, close this issue as rejected. Once again, thanks for looking into this.
          diego dupin Diego Dupin added a comment -

          closing as indicate

          diego dupin Diego Dupin added a comment - closing as indicate

          People

            diego dupin Diego Dupin
            chalda Ondra Chaloupka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.