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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
    • Fix Version/s: 10.5.2
    • Component/s: Server
    • Labels:
      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

              Assignee:
              Elkin Andrei Elkin
              Reporter:
              Elkin Andrei Elkin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: