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

xa transactions can commit in read_only

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2.36, 10.2, 10.3, 10.4, 10.5
    • 10.4, 10.5
    • XA
    • None

    Description

      connection1

      MariaDB [test]> create table t ( i int primary key);
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> XA START 'test';
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> insert into t values (41), (3324),(14);
      Query OK, 3 rows affected (0.00 sec)
      Records: 3  Duplicates: 0  Warnings: 0
      
      

      connection2

      MariaDB [(none)]> set global read_only=1;
      Query OK, 0 rows affected (0.00 sec)
      

      connection1

      MariaDB [test]> XA END 'test';
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> XA PREPARE 'test';
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> XA COMMIT 'test';
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> select * from t;
      +------+
      | i    |
      +------+
      |   14 |
      |   41 |
      | 3324 |
      +------+
      3 rows in set (0.00 sec)
      
      

      A non-XA transaction would of errored on the `COMMIT`. XA has no such limitations.

      Attachments

        Activity

          People

            serg Sergei Golubchik
            danblack Daniel Black
            Votes:
            0 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.