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