Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-37829

Spider: XA COMMIT ONE PHASE fails with "This xid does not exist"

    XMLWordPrintable

Details

    Description

      A distributed transaction using XA COMMIT ... ONE PHASE fails with ERROR 12607 (HY000): This xid does not exist. This failure occurs when an UPDATE statement fires a trigger that calls a stored procedure, and that procedure contains a reference to a table using the SPIDER storage engine.

      The bug appears even if the code path that queries the SPIDER table is never executed due to conditional logic (e.g., an IF statement that evaluates to false). The presence of the SPIDER table reference within the trigger's potential execution path is enough to cause the one-phase commit to fail.

      The standard two-phase commit (XA PREPARE followed by XA COMMIT) works correctly under the exact same conditions. This indicates a specific issue with how the SPIDER engine handles the optimized one-phase commit process in XA transactions.

      How to Reproduce:

      Use attached file.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            claudio.nanni Claudio Nanni
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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