Debian Codegraph @

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

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