summaryrefslogtreecommitdiff
path: root/mysql-test/suite/plugins
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2018-05-10 19:00:54 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2018-05-10 19:00:54 +0400
commit318097bb8f6e12c546b5dcd287416158209dbb39 (patch)
treed9f73f615bece7a2286b8115adc5a6f72c36b6f3 /mysql-test/suite/plugins
parent1d58d184c2c4ddd8a3b2be6f86d76c4e57bbe14f (diff)
downloadmariadb-git-318097bb8f6e12c546b5dcd287416158209dbb39.tar.gz
MDEV-15480 Audit plugin does not respect QUERY_DML for audit plugin.
QUERY_DML_NO_SELECT flag added.
Diffstat (limited to 'mysql-test/suite/plugins')
-rw-r--r--mysql-test/suite/plugins/r/server_audit.result12
-rw-r--r--mysql-test/suite/plugins/t/server_audit.test7
2 files changed, 19 insertions, 0 deletions
diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result
index 80b434553e5..2e18a489dc7 100644
--- a/mysql-test/suite/plugins/r/server_audit.result
+++ b/mysql-test/suite/plugins/r/server_audit.result
@@ -182,6 +182,17 @@ select 2;
2
2
drop table t1;
+set global server_audit_events='query_dml_no_select';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+select 2;
+2
+2
+drop table t1;
set global server_audit_events='';
set global server_audit_query_log_limit= 15;
select (1), (2), (3), (4);
@@ -332,6 +343,7 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD \n# comment\nFOR u1
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1=<secret>',ID
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into t1 values (1), (2)',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global serv',0
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select (1), (2)',0
diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test
index 6c5eaffd9a2..4af1ed883e3 100644
--- a/mysql-test/suite/plugins/t/server_audit.test
+++ b/mysql-test/suite/plugins/t/server_audit.test
@@ -121,6 +121,13 @@ select 2;
/*! select 2*/;
/*comment*/ select 2;
drop table t1;
+set global server_audit_events='query_dml_no_select';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+select 2;
+drop table t1;
+
set global server_audit_events='';
set global server_audit_query_log_limit= 15;