Debian Codegraph @

mysql-test/suite/plugins/r/unix_socket.result

raw
1 #
2 # with named user
3 #
4 create user 'USER' identified via unix_socket;
5 grant select on test.* to 'USER';
6 #
7 # name match = ok
8 #
9 select user(), current_user(), database();
10 user() current_user() database()
11 USER@localhost USER@% test
12 #
13 # name does not match = failure
14 #
15 drop user 'USER';
16 #
17 # and now with anonymous user
18 #
19 grant SELECT ON test.* TO '' identified via unix_socket;
20 #
21 # name match = ok
22 #
23 select user(), current_user(), database();
24 user() current_user() database()
25 USER@localhost @% test
26 #
27 # name does not match = failure
28 #
29 delete from mysql.user where user='';
30 FLUSH PRIVILEGES;
31 delete from mysql.db;