Debian Codegraph @

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

raw
1 #
2 #
3 #
4 # Test that "SET sql_log_bin" is not allowed without BINLOG ADMIN
5 CREATE USER user1@localhost;
6 GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
7 REVOKE BINLOG ADMIN ON *.* FROM user1@localhost;
8 connect user1,localhost,user1,,;
9 connection user1;
10 SET sql_log_bin=1;
11 ERROR 42000: Access denied; you need (at least one of) the BINLOG ADMIN privilege(s) for this operation
12 SET GLOBAL sql_log_bin=1;
13 ERROR 42000: Access denied; you need (at least one of) the BINLOG ADMIN privilege(s) for this operation
14 SET SESSION sql_log_bin=1;
15 ERROR 42000: Access denied; you need (at least one of) the BINLOG ADMIN privilege(s) for this operation
16 disconnect user1;
17 connection default;
18 DROP USER user1@localhost;
19 # Test that "SET sql_log_bin" is allowed with BINLOG ADMIN
20 CREATE USER user1@localhost;
21 GRANT BINLOG ADMIN ON *.* TO user1@localhost;
22 connect user1,localhost,user1,,;
23 connection user1;
24 SET sql_log_bin=1;
25 SET GLOBAL sql_log_bin=1;
26 ERROR HY000: Variable 'sql_log_bin' is a SESSION variable
27 SET SESSION sql_log_bin=1;
28 disconnect user1;
29 connection default;
30 DROP USER user1@localhost;