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

Implement transaction support for "transactional" Aria tables

Details

    Description

      Aria tables can be made "transactional" by setting the TRANSACTIONAL table option. However, these "transactional" Aria tables do not actually support transactions. Instead, Aria's transaction log makes them crash-safe.

      For example, try running the following statements:

      CREATE TABLE aria_tab (id int) ENGINE=Aria TRANSACTIONAL=1;
      BEGIN;
      INSERT INTO aria_tab VALUES (1);
      ROLLBACK;
      SHOW WARNINGS;
      SELECT * FROM aria_tab;
      

      You'll see that the ROLLBACK doesn't work, because the "transactional" Aria table is considered to be a "non-transactional table." See here:

      MariaDB [db1]> CREATE TABLE aria_tab (id int) ENGINE=Aria TRANSACTIONAL=1;
      Query OK, 0 rows affected (0.01 sec)
       
      MariaDB [db1]> BEGIN;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [db1]> INSERT INTO aria_tab VALUES (1);
      Query OK, 1 row affected (0.00 sec)
       
      MariaDB [db1]> ROLLBACK;
      Query OK, 0 rows affected, 1 warning (0.00 sec)
       
      MariaDB [db1]> SHOW WARNINGS;
      +---------+------+---------------------------------------------------------------+
      | Level   | Code | Message                                                       |
      +---------+------+---------------------------------------------------------------+
      | Warning | 1196 | Some non-transactional changed tables couldn't be rolled back |
      +---------+------+---------------------------------------------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [db1]> SELECT * FROM aria_tab;
      +------+
      | id   |
      +------+
      |    1 |
      +------+
      1 row in set (0.00 sec)
      

      This behavior is consistent with what is displayed by SHOW ENGINES, which shows that Aria is not transactional:

      MariaDB [db1]> SHOW ENGINES;
      +--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
      | Engine             | Support | Comment                                                                          | Transactions | XA   | Savepoints |
      +--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
      ...
      | Aria               | YES     | Crash-safe tables with MyISAM heritage                                           | NO           | NO   | NO         |
      ...
      +--------------------+---------+----------------------------------------------------------------------------------+--------------+------+------------+
      8 rows in set (0.00 sec)
      

      Attachments

        Activity

          f_razzoli Federico Razzoli added a comment - - edited

          This task is currently linked in Aria documentation:
          https://mariadb.com/kb/en/aria-storage-engine/

          In my understanding, making Aria transactional was ever in the ToDo but it didn't happen yet. Including this link in the docs, imho, makes users think that Aria will be transactional in the foreseeable future. If that is not the case, I think that the link should be removed.
          Or at least, it should be clear from the task that it is not going to happen soon (if ever).

          f_razzoli Federico Razzoli added a comment - - edited This task is currently linked in Aria documentation: https://mariadb.com/kb/en/aria-storage-engine/ In my understanding, making Aria transactional was ever in the ToDo but it didn't happen yet. Including this link in the docs, imho, makes users think that Aria will be transactional in the foreseeable future. If that is not the case, I think that the link should be removed. Or at least, it should be clear from the task that it is not going to happen soon (if ever).

          People

            Unassigned Unassigned
            GeoffMontee Geoff Montee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.