Debian Codegraph @

mysql-test/suite/sys_vars/inc/sysvar_global_grant.inc

raw
1 --source include/not_embedded.inc
2
3 --eval SET @global=@@global.$var
4
5 --echo # Test that "SET $var" is not allowed without $grant
6
7 CREATE USER user1@localhost;
8 GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
9 --eval REVOKE $grant ON *.* FROM user1@localhost
10 --connect(user1,localhost,user1,,)
11 --connection user1
12 --error ER_SPECIFIC_ACCESS_DENIED_ERROR
13 --eval SET GLOBAL $var=$value
14 --error ER_GLOBAL_VARIABLE
15 --eval SET $var=$value
16 --error ER_GLOBAL_VARIABLE
17 --eval SET SESSION $var=$value
18 --disconnect user1
19 --connection default
20 DROP USER user1@localhost;
21
22 --echo # Test that "SET $var" is allowed with $grant
23
24 CREATE USER user1@localhost;
25 --eval GRANT $grant ON *.* TO user1@localhost
26 --connect(user1,localhost,user1,,)
27 --connection user1
28 --eval SET GLOBAL $var=$value
29 --error ER_GLOBAL_VARIABLE
30 --eval SET $var=$value
31 --error ER_GLOBAL_VARIABLE
32 --eval SET SESSION $var=$value
33 --disconnect user1
34 --connection default
35 DROP USER user1@localhost;
36
37 --eval SET @@global.$var=@global