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

XA Transction unable to ROLLBACK TO SAVEPOINT

Details

    • 5.5.59

    Description

      It appears it's not possible to restore to an savepoint within in a XA transaction

      create table t1(
      	c1 int
      ) engine=innodb;
       
      XA START 'xa1';
      SAVEPOINT savepoint1;
      INSERT INTO t1 (c1) VALUES (1),(2),(3),(4);
       
      ROLLBACK TO SAVEPOINT savepoint1;
      

      this gives error:
      Error Code: 1399. XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state

      When i try the exact same query in mysql (5.7), this produces no errors, also the transaction is restored to the actual savepoint.
      When savepoints wouldn't be supported in XA transactions, i would expect the SAVEPOINT x would already result in an error.

      Attachments

        Issue Links

          Activity

            olafbuitelaar Olaf Buitelaar created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            Labels 10.2-ga Compatibility Compatibility
            elenst Elena Stepanova made changes -
            Labels Compatibility Compatibility upstream-fixed
            elenst Elena Stepanova made changes -
            Fix Version/s 10.2 [ 14601 ]
            Affects Version/s 5.5 [ 15800 ]
            Affects Version/s 10.0 [ 16000 ]
            Affects Version/s 10.1 [ 16100 ]
            Affects Version/s 10.2 [ 14601 ]
            Description
            It appears it's not possible to restore to an savepoint within in a XA transaction

            {code:sql}
            create table t1(
            c1 int
            ) engine=innodb;

            XA START 'xa1';
            SAVEPOINT savepoint1;
            INSERT INTO t1 (c1) VALUES (1),(2),(3),(4);

            ROLLBACK TO SAVEPOINT savepoint1;
            {code}

            this gives error:
            Error Code: 1399. XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state

            When i try the exact same query in mysql (5.7), this produces no errors, also the transaction is restored to the actual savepoint.
            When savepoints wouldn't be supported in XA transactions, i would expect the SAVEPOINT x would already result in an error.
            It appears it's not possible to restore to an savepoint within in a XA transaction

            {code:sql}
            create table t1(
            c1 int
            ) engine=innodb;

            XA START 'xa1';
            SAVEPOINT savepoint1;
            INSERT INTO t1 (c1) VALUES (1),(2),(3),(4);

            ROLLBACK TO SAVEPOINT savepoint1;
            {code}

            this gives error:
            Error Code: 1399. XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state

            When i try the exact same query in mysql (5.7), this produces no errors, also the transaction is restored to the actual savepoint.
            When savepoints wouldn't be supported in XA transactions, i would expect the SAVEPOINT x would already result in an error.
            elenst Elena Stepanova made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            serg Sergei Golubchik made changes -
            Fix Version/s 5.5 [ 15800 ]
            Fix Version/s 10.0 [ 16000 ]
            Fix Version/s 10.1 [ 16100 ]
            serg Sergei Golubchik made changes -
            Sprint 5.5.59 [ 221 ]
            serg Sergei Golubchik made changes -
            Assignee Alexander Barkov [ bar ]
            serg Sergei Golubchik made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            bar Alexander Barkov made changes -
            issue.field.resolutiondate 2018-01-15 09:53:22.0 2018-01-15 09:53:22.945
            bar Alexander Barkov made changes -
            Fix Version/s 5.5.59 [ 22612 ]
            Fix Version/s 10.0.34 [ 22613 ]
            Fix Version/s 10.3.4 [ 22904 ]
            Fix Version/s 10.1.31 [ 22907 ]
            Fix Version/s 10.2.13 [ 22910 ]
            Fix Version/s 10.2 [ 14601 ]
            Fix Version/s 5.5 [ 15800 ]
            Fix Version/s 10.0 [ 16000 ]
            Fix Version/s 10.1 [ 16100 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            bar Alexander Barkov made changes -
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 84351 ] MariaDB v4 [ 153322 ]

            People

              bar Alexander Barkov
              olafbuitelaar Olaf Buitelaar
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.