1
# Making connection using the username:password pair provided in dynamic.users1 file.
2
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
3
connect (connection1,localhost,auth_file_password,test_password1,,);
4
connection connection1;
6
#Test that the auth_file_users can't be replaced with an empty value
7
--error ER_WRONG_ARGUMENTS
8
SET GLOBAL auth_file_users="";
10
#Test that the auth_file_users can't be replaced with a non existent file
11
--replace_result $TOP_SRCDIR TOP_SRCDIR
12
--error ER_WRONG_ARGUMENTS
13
eval SET GLOBAL auth_file_users="$TOP_SRCDIR/plugin/auth_file/tests/t/dynamic.users3";
15
#Test that the auth_file_users can be replaced with a different file
16
--replace_result $TOP_SRCDIR TOP_SRCDIR
17
eval SET GLOBAL auth_file_users="$TOP_SRCDIR/plugin/auth_file/tests/t/dynamic.users2";
19
disconnect connection1;
20
# Test that the connection to database can't be now made using the old username:password pair given in dynamic.users1 file.
21
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
22
--replace_regex /@'.*?'/@'LOCALHOST'/
23
--error ER_ACCESS_DENIED_ERROR
24
connect (connection2,localhost,auth_file_password,test_password1,,);
26
# Test that the connection to database can now be made using the username:password pair provided in dynamic.users2 file
27
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
28
connect (connection3,localhost,auth_file_password,test_password2,,);
29
connection connection3;
31
disconnect connection3;