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

aria engine transaction logging for a table is enabled by default.

    XMLWordPrintable

Details

    Description

      The data manipulation statements trigger writes into aria transaction log(s) for the tables created with DEFAULT engine options.
      Two side effects: 1) unexpected performance penalty; 2) In combination with MDEV-8587 documented behavior security of the data seriously impaired.

      SQL Client

      MariaDB [dummydb]> create table test5 (x int, y varchar(1024));
      Query OK, 0 rows affected (0.01 sec)
       
      MariaDB [dummydb]> show create table test5;
      +-------+------------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                             |
      +-------+------------------------------------------------------------------------------------------------------------------------------------------+
      | test5 | CREATE TABLE `test5` (
        `x` int(11) DEFAULT NULL,
        `y` varchar(1024) DEFAULT NULL
      ) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 |
      +-------+------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [dummydb]> insert into test5 (x,y) values (1,"THIS IS NOT SUPPOSED TO BE THERE");
      Query OK, 1 row affected (0.00 sec)
       
      MariaDB [dummydb]> flush tables;
      Query OK, 0 rows affected (0.01 sec)
      

      console

      dummydb$ tr -cd '\11\12\15\40-\176' < ../aria_log.00000001 | grep "THIS"
      "[tRpS=*mydb/tesJxdt#t./dummydb/test5t2 THIS IS NOT SUPPOSED TO BE THEREtb/test5          Y-xY-x?G@El`  \G
      dummydb$ tr -c '\11\12\15\40-\176' '\n' < ../aria_log.00000001 | grep "THIS"
      THIS IS NOT SUPPOSED TO BE THERE
      

      SQL Client

      MariaDB [dummydb]> alter table test5 transactional=0;
      Query OK, 1 row affected (0.02 sec)                
      Records: 1  Duplicates: 0  Warnings: 0
       
      MariaDB [dummydb]> insert into test5 (x,y) values (2,"NOW IT IS OK");
      Query OK, 1 row affected (0.00 sec)
       
      MariaDB [dummydb]> flush tables;
      Query OK, 0 rows affected (0.00 sec)
      

      console

      dummydb$ tr -c '\11\12\15\40-\176' '\n' < ../aria_log.00000001 | grep "NOW"; echo $?
      1
      

      Attachments

        Activity

          People

            greenman Ian Gilfillan
            yv Yuriy Vasylchenko
            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.