Debian Codegraph @

mysql-test/suite/sys_vars/r/secure_auth_grant.result

raw
1 SET @global=@@global.secure_auth;
2 #
3 # MDEV-21961 Bind CONNECTION ADMIN to a number of global system variables
4 #
5 # Test that "SET secure_auth" is not allowed without CONNECTION ADMIN
6 CREATE USER user1@localhost;
7 GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
8 REVOKE CONNECTION ADMIN ON *.* FROM user1@localhost;
9 connect user1,localhost,user1,,;
10 connection user1;
11 SET GLOBAL secure_auth=1;
12 ERROR 42000: Access denied; you need (at least one of) the CONNECTION ADMIN privilege(s) for this operation
13 SET secure_auth=1;
14 ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
15 SET SESSION secure_auth=1;
16 ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
17 disconnect user1;
18 connection default;
19 DROP USER user1@localhost;
20 # Test that "SET secure_auth" is allowed with CONNECTION ADMIN
21 CREATE USER user1@localhost;
22 GRANT CONNECTION ADMIN ON *.* TO user1@localhost;
23 connect user1,localhost,user1,,;
24 connection user1;
25 SET GLOBAL secure_auth=1;
26 Warnings:
27 Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
28 SET secure_auth=1;
29 ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
30 SET SESSION secure_auth=1;
31 ERROR HY000: Variable 'secure_auth' is a GLOBAL variable and should be set with SET GLOBAL
32 disconnect user1;
33 connection default;
34 DROP USER user1@localhost;
35 SET @@global.secure_auth=@global;
36 Warnings:
37 Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release