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

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

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.0, 5.5
    • Fix Version/s: 10.0, 5.5
    • Component/s: Plugin - Audit
    • Labels:

      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.

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                holyfoot Alexey Botchkov
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: