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

xa transactions can commit in read_only

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2, 10.3, 10.4, 10.5, 10.2.36
    • Fix Version/s: 10.2, 10.3, 10.4, 10.5
    • Component/s: XA
    • Labels:
      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

            Assignee:
            serg Sergei Golubchik
            Reporter:
            danblack Daniel Black
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration