[MDEV-7462] Server audit: SET STATEMENT .. FOR <DML or DDL> is not recognized as DML or DDL Created: 2015-01-14  Updated: 2015-01-15  Resolved: 2015-01-15

Status: Closed
Project: MariaDB Server
Component/s: Plugin - Audit
Affects Version/s: N/A
Fix Version/s: 10.1.3

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: audit


 Description   

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


Generated at Thu Feb 08 07:19:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.