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

Server audit: QUERY_DML and TABLE events in transactional context are inconsistent

    XMLWordPrintable

Details

    Description

      MariaDB [test]> set global server_audit_events = 'QUERY_DML,TABLE';
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> create table t1 (i int) engine=InnoDB;
      Query OK, 0 rows affected (0.16 sec)
       
      MariaDB [test]> begin;
      Query OK, 0 rows affected (0.01 sec)
       
      MariaDB [test]> insert into t1 values (1);
      Query OK, 1 row affected (0.00 sec)
       
      MariaDB [test]> rollback;
      Query OK, 0 rows affected (0.04 sec)

      20150113 21:10:41,wheezy-64,root,localhost,4,127,CREATE,test,t1,
      20150113 21:10:50,wheezy-64,root,localhost,4,129,WRITE,test,t1,
      20150113 21:10:50,wheezy-64,root,localhost,4,129,QUERY,test,'insert into t1 values (1)',0

      According to the audit log, both QUERY events and TABLE events, there was a write into the table, while in fact there wasn't.
      For TABLE events, there should either be two writes (pseudo-insert and then pseudo-delete), or better none. For QUERY_DML events, I don't really have a good idea how it should be handled properly.

      Attachments

        Activity

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.