|
SET STATEMENT .. FOR <DML or DDL> is another way to execute <DML or DDL>, but it's not recognized by audit parsing.
MariaDB [test]> set global server_audit_events = query_dml;
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [test]> select 1;
|
+---+
|
| 1 |
|
+---+
|
| 1 |
|
+---+
|
1 row in set (0.00 sec)
|
|
MariaDB [test]> set statement lock_wait_timeout=1 for select 2;
|
+---+
|
| 2 |
|
+---+
|
| 2 |
|
+---+
|
1 row in set (0.00 sec)
|
|
MariaDB [test]> select 3;
|
+---+
|
| 3 |
|
+---+
|
| 3 |
|
+---+
|
1 row in set (0.01 sec)
|
20150114 19:33:26,wheezy-64,root,localhost,2,8,QUERY,test,'select 1',0
|
20150114 19:33:44,wheezy-64,root,localhost,2,10,QUERY,test,'select 3',0
|
MariaDB [test]> set global server_audit_events = query_ddl;
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [test]> create table t1 (i int);
|
Query OK, 0 rows affected (1.40 sec)
|
|
MariaDB [test]> set statement lock_wait_timeout=1 for create table t2 (i int);
|
Query OK, 0 rows affected (0.73 sec)
|
|
MariaDB [test]> create table t3 (i int);
|
Query OK, 0 rows affected (0.49 sec)
|
20150114 19:35:25,wheezy-64,root,localhost,2,13,QUERY,test,'create table t1 (i int)',0
|
20150114 19:35:33,wheezy-64,root,localhost,2,15,QUERY,test,'create table t3 (i int)',0
|
|