diff options
Diffstat (limited to 'mysql-test/t/rpl_do_grant.test')
-rw-r--r-- | mysql-test/t/rpl_do_grant.test | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/mysql-test/t/rpl_do_grant.test b/mysql-test/t/rpl_do_grant.test index 54287a67657..8d6f99e4bf1 100644 --- a/mysql-test/t/rpl_do_grant.test +++ b/mysql-test/t/rpl_do_grant.test @@ -1,6 +1,7 @@ -# Test that GRANT and SET PASSWORD are replicated to the slave +# Works in statement-based and row-based binlogging. +# Test that GRANT and other user management commands are replicated to the slave -source include/master-slave.inc; +-- source include/master-slave.inc # do not be influenced by other tests. connection master; @@ -46,3 +47,52 @@ sync_with_master; flush privileges; # End of 4.1 tests + +connection master; +--error 1141 +show grants for rpl_do_grant@localhost; +connection slave; +--error 1141 +show grants for rpl_do_grant@localhost; + +connection master; +create user rpl_do_grant@localhost; +show grants for rpl_do_grant@localhost; +--error 1141 +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +show grants for rpl_do_grant@localhost; +--error 1141 +show grants for rpl_do_grant2@localhost; + +connection master; +rename user rpl_do_grant@localhost to rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +show grants for rpl_do_grant2@localhost; + +connection master; +grant DELETE,INSERT on mysqltest1.* to rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +show grants for rpl_do_grant2@localhost; + +connection master; +revoke DELETE on mysqltest1.* from rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +show grants for rpl_do_grant2@localhost; + +connection master; +revoke all privileges, grant option from rpl_do_grant2@localhost; +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +show grants for rpl_do_grant2@localhost; + +connection master; +drop user rpl_do_grant2@localhost; +--error 1141 +show grants for rpl_do_grant2@localhost; +sync_slave_with_master; +--error 1141 +show grants for rpl_do_grant2@localhost; |