Debian Codegraph @

mysql-test/suite/sys_vars/t/binlog_format_grant.test

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