Debian Codegraph @

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

raw
1 #
2 # MDEV-21975 Add BINLOG REPLAY privilege and bind new privileges to gtid_seq_no, preudo_thread_id, server_id, gtid_domain_id
3 #
4 SET @session=@@session.pseudo_thread_id;
5 # Test that "SET pseudo_thread_id" is not allowed without BINLOG REPLAY
6 CREATE USER user1@localhost;
7 GRANT ALL PRIVILEGES ON *.* TO user1@localhost;
8 REVOKE BINLOG REPLAY ON *.* FROM user1@localhost;
9 connect user1,localhost,user1,,;
10 connection user1;
11 SET GLOBAL pseudo_thread_id=1;
12 ERROR HY000: Variable 'pseudo_thread_id' is a SESSION variable and can't be used with SET GLOBAL
13 SET pseudo_thread_id=1;
14 ERROR 42000: Access denied; you need (at least one of) the BINLOG REPLAY privilege(s) for this operation
15 SET SESSION pseudo_thread_id=1;
16 ERROR 42000: Access denied; you need (at least one of) the BINLOG REPLAY privilege(s) for this operation
17 disconnect user1;
18 connection default;
19 DROP USER user1@localhost;
20 # Test that "SET pseudo_thread_id" is allowed with BINLOG REPLAY
21 CREATE USER user1@localhost;
22 GRANT BINLOG REPLAY ON *.* TO user1@localhost;
23 connect user1,localhost,user1,,;
24 connection user1;
25 SET GLOBAL pseudo_thread_id=1;
26 ERROR HY000: Variable 'pseudo_thread_id' is a SESSION variable and can't be used with SET GLOBAL
27 SET pseudo_thread_id=1;
28 SET SESSION pseudo_thread_id=1;
29 disconnect user1;
30 connection default;
31 DROP USER user1@localhost;
32 SET @@session.pseudo_thread_id=@session;