summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2019-04-29 00:11:48 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2019-04-29 00:11:48 +0400
commitcd26cdcd974725031e30393ff165fb0dfb365c4d (patch)
tree619f79e4be04d2d4bf558bfc0db129f0e1e27afb /mysql-test
parent00377147e3029b982cbc29d3f4477362c6e6fdb4 (diff)
downloadmariadb-git-cd26cdcd974725031e30393ff165fb0dfb365c4d.tar.gz
MDEV-19141 server_audit_excl_users accepts only values with less than 1024 chars.
Since this limit is imposed by the SHOW_VAR_FUNC_BUFF_SIZE, we just launch the error message.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/plugins/r/server_audit.result14
-rw-r--r--mysql-test/suite/plugins/t/server_audit.test8
2 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result
index 01392760317..0709444e5f6 100644
--- a/mysql-test/suite/plugins/r/server_audit.result
+++ b/mysql-test/suite/plugins/r/server_audit.result
@@ -21,6 +21,16 @@ set global server_audit_incl_users=null;
set global server_audit_file_path='server_audit.log';
set global server_audit_output_type=file;
set global server_audit_logging=on;
+set global server_audit_incl_users= repeat("'root',", 10000);
+ERROR 42000: Variable 'server_audit_incl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','roo'
+show variables like 'server_audit_incl_users';
+Variable_name Value
+server_audit_incl_users
+set global server_audit_excl_users= repeat("'root',", 10000);
+ERROR 42000: Variable 'server_audit_excl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','roo'
+show variables like 'server_audit_excl_users';
+Variable_name Value
+server_audit_excl_users
connect con1,localhost,root,,mysql;
connection default;
disconnect con1;
@@ -251,6 +261,10 @@ uninstall plugin server_audit;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_logging=on',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users= repeat("\'root\',", 10000)',ID
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'show variables like \'server_audit_incl_users\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_excl_users= repeat("\'root\',", 10000)',ID
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'show variables like \'server_audit_excl_users\'',0
TIME,HOSTNAME,root,localhost,ID,0,CONNECT,mysql,,0
TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,mysql,,0
TIME,HOSTNAME,no_such_user,localhost,ID,0,FAILED_CONNECT,,,ID
diff --git a/mysql-test/suite/plugins/t/server_audit.test b/mysql-test/suite/plugins/t/server_audit.test
index 4af1ed883e3..fa23dc5caa3 100644
--- a/mysql-test/suite/plugins/t/server_audit.test
+++ b/mysql-test/suite/plugins/t/server_audit.test
@@ -13,6 +13,14 @@ set global server_audit_incl_users=null;
set global server_audit_file_path='server_audit.log';
set global server_audit_output_type=file;
set global server_audit_logging=on;
+
+--error ER_WRONG_VALUE_FOR_VAR
+set global server_audit_incl_users= repeat("'root',", 10000);
+show variables like 'server_audit_incl_users';
+--error ER_WRONG_VALUE_FOR_VAR
+set global server_audit_excl_users= repeat("'root',", 10000);
+show variables like 'server_audit_excl_users';
+
--sleep 2
connect (con1,localhost,root,,mysql);
connection default;