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

XA ROLLBACK reports ER_XAER_NOTA for another connection's XA PREPARE

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.2(EOL), 10.6
    • 10.5
    • XA
    • None

    Description

      The following test returns an error for the first XA ROLLBACK statement. I think that at least starting with 10.5 (thanks to the changes of MDEV-742) it should be possible to detach the transaction from the original connection and allow another connection to execute the XA COMMIT or XA ROLLBACK.

      --source include/have_innodb.inc
      create table test(x int) engine=innodb;
      xa start 0x01,0x01,0x01;
      insert into test(x) values (1);
      xa end 0x01,0x01,0x01;
      xa prepare 0x01,0x01,0x01;
      xa recover;
      connect other,localhost,root,,;
      xa recover;
      --error ER_XAER_NOTA
      xa rollback 0x01,0x01,0x01;
      disconnect other;
      connection default;
      xa rollback 0x01,0x01,0x01;
      drop table test;
      

      Note: XA RECOVER will list the transaction to both connections.

      Attachments

        Issue Links

          Activity

            valerii Valerii Kravchuk added a comment - - edited

            Still repeatable with 10.6.13 build from current GitHb sources, just in case:

            Yuliyas-Air:mysql-test Valerii$ ./mtr --suite=innodb MDEV-25055
            Logging: ./mtr  --suite=innodb MDEV-25055
            VS config: 
            vardir: /Users/Valerii/dbs/maria10.6/mysql-test/var
            Checking leftover processes...
            Removing old var directory...
            Creating var directory '/Users/Valerii/dbs/maria10.6/mysql-test/var'...
            Checking supported features...
            MariaDB Version 10.6.13-MariaDB
             - SSL connections supported
            Collecting tests...
            Installing system database...
             
            ==============================================================================
             
            TEST                                      RESULT   TIME (ms) or COMMENT
            --------------------------------------------------------------------------
             
            worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
            create table test(x int) engine=innodb;
            xa start 0x01,0x01,0x01;
            insert into test(x) values (1);
            xa end 0x01,0x01,0x01;
            xa prepare 0x01,0x01,0x01;
            xa recover;
            formatID	gtrid_length	bqual_length	data
            1	1	1	
            connect other,localhost,root,,;
            xa recover;
            formatID	gtrid_length	bqual_length	data
            1	1	1	
            xa rollback 0x01,0x01,0x01;
            ERROR XAE04: XAER_NOTA: Unknown XID
            disconnect other;
            connection default;
            xa rollback 0x01,0x01,0x01;
            drop table test;
            innodb.MDEV-25055 'innodb'               [ pass ]     41
            --------------------------------------------------------------------------
            The servers were restarted 0 times
            Spent 0.041 of 18 seconds executing testcases
             
            Completed: All 1 tests were successful.
            
            

            valerii Valerii Kravchuk added a comment - - edited Still repeatable with 10.6.13 build from current GitHb sources, just in case: Yuliyas-Air:mysql-test Valerii$ ./mtr --suite=innodb MDEV-25055 Logging: ./mtr --suite=innodb MDEV-25055 VS config: vardir: /Users/Valerii/dbs/maria10.6/mysql-test/var Checking leftover processes... Removing old var directory... Creating var directory '/Users/Valerii/dbs/maria10.6/mysql-test/var'... Checking supported features... MariaDB Version 10.6.13-MariaDB - SSL connections supported Collecting tests... Installing system database...   ==============================================================================   TEST RESULT TIME (ms) or COMMENT --------------------------------------------------------------------------   worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019 create table test(x int) engine=innodb; xa start 0x01,0x01,0x01; insert into test(x) values (1); xa end 0x01,0x01,0x01; xa prepare 0x01,0x01,0x01; xa recover; formatID gtrid_length bqual_length data 1 1 1 connect other,localhost,root,,; xa recover; formatID gtrid_length bqual_length data 1 1 1 xa rollback 0x01,0x01,0x01; ERROR XAE04: XAER_NOTA: Unknown XID disconnect other; connection default; xa rollback 0x01,0x01,0x01; drop table test; innodb.MDEV-25055 'innodb' [ pass ] 41 -------------------------------------------------------------------------- The servers were restarted 0 times Spent 0.041 of 18 seconds executing testcases   Completed: All 1 tests were successful.

            People

              Unassigned Unassigned
              marko Marko Mäkelä
              Votes:
              1 Vote for this issue
              Watchers:
              3 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.