Debian Codegraph @

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

raw
1 #
2 # MDEV-21973 Bind REPLICATION {MASTER|SLAVE} ADMIN to gtid_* GLOBAL-only system variables
3 #
4 # Test that "SET gtid_binlog_state" is not allowed without REPLICATION MASTER ADMIN
5 CREATE USER user1@localhost;
6 GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
7 REVOKE REPLICATION MASTER ADMIN ON *.* FROM user1@localhost;
8 connect user1,localhost,user1,,;
9 connection user1;
10 SET GLOBAL gtid_binlog_state='0-1-10';
11 ERROR 42000: Access denied; you need (at least one of) the REPLICATION MASTER ADMIN privilege(s) for this operation
12 SET gtid_binlog_state='0-1-10';
13 ERROR HY000: Variable 'gtid_binlog_state' is a GLOBAL variable and should be set with SET GLOBAL
14 SET SESSION gtid_binlog_state='0-1-10';
15 ERROR HY000: Variable 'gtid_binlog_state' is a GLOBAL variable and should be set with SET GLOBAL
16 disconnect user1;
17 connection default;
18 DROP USER user1@localhost;
19 # Test that "SET gtid_binlog_state" is allowed with REPLICATION MASTER ADMIN
20 CREATE USER user1@localhost;
21 GRANT REPLICATION MASTER ADMIN ON *.* TO user1@localhost;
22 connect user1,localhost,user1,,;
23 connection user1;
24 SET GLOBAL gtid_binlog_state='0-1-10';
25 ERROR HY000: Binlog closed, cannot RESET MASTER
26 SET gtid_binlog_state='0-1-10';
27 ERROR HY000: Variable 'gtid_binlog_state' is a GLOBAL variable and should be set with SET GLOBAL
28 SET SESSION gtid_binlog_state='0-1-10';
29 ERROR HY000: Variable 'gtid_binlog_state' is a GLOBAL variable and should be set with SET GLOBAL
30 disconnect user1;
31 connection default;
32 DROP USER user1@localhost;