[MDEV-7463] Server audit: ANALYZE <INSERT|REPLACE|UPDATE|DELETE> is not recognized as DML 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: 5.5.42

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


 Description   

ANALYZE INSERT/REPLACE/UPDATE/DELETE is another way to execute the DML, but it's not recognized as DML by audit parsing.

MariaDB [test]> set global server_audit_events = query_dml;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [test]> delete from t1;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [test]> analyze insert into t1 values (1);
+------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+-------+
| id   | select_type | table | type | possible_keys | key  | key_len | ref  | rows | r_rows | filtered | r_filtered | Extra |
+------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+-------+
|    1 | INSERT      | t1    | ALL  | NULL          | NULL | NULL    | NULL | NULL |   NULL |   100.00 |     100.00 | NULL  |
+------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+-------+
1 row in set (0.08 sec)
 
MariaDB [test]> select * from t1;
+------+
| i    |
+------+
|    1 |
+------+
1 row in set (0.00 sec)

20150114 19:39:51,wheezy-64,root,localhost,2,26,QUERY,test,'delete from t1',0
20150114 19:39:58,wheezy-64,root,localhost,2,28,QUERY,test,'select * from t1',0
Waiting for data... (interrupt to abort)



 Comments   
Comment by Alexey Botchkov [ 2015-01-15 ]

Documentation fixed.

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