Debian Codegraph @

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

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