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

xa commit 'xid' one phase for already prepared transaction must always error out

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1, 10.2, 10.3, 10.4, 10.5
    • 10.5.2
    • Server
    • None

    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).

      Attachments

        Issue Links

          Activity

            People

              Elkin Andrei Elkin
              Elkin Andrei Elkin
              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.