config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/rpl/t/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/rpl/t/rpl_ignore_revoke.test

# test verifies that REVOKE must not be replicated when 
# slave server starts with --replicate-wild-ignore-table=mysql.% 
# the option is set in rpl_ignore_revoke-slave.opt
# The first part of BUG#9483 for GRANT is checked by
# existed specific rpl_ignore_grant test case (BUG#980)

--source include/not_group_replication_plugin.inc
source include/master-slave.inc;

###  CLEAN-UP: create an account and manually duplicate it on the slave

connection master;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;

--source include/sync_slave_sql_with_master.inc
#connection slave;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
revoke select on *.* from 'user_foo'@'%';
select select_priv from mysql.user where user='user_foo' /* slave:must be N */;


### TEST

#connection slave;
grant select on *.* to 'user_foo'@'%' identified by 'user_foopass';
select select_priv from mysql.user where user='user_foo' /* slave:must be Y */;

connection master;
revoke select on *.* from 'user_foo';
select select_priv from mysql.user where user='user_foo' /* master:must be N */;

--source include/sync_slave_sql_with_master.inc
#connection slave;
select select_priv from mysql.user where user='user_foo' /* slave:must get Y */;

### CLEAN-UP

connection slave;
--disable_abort_on_error
revoke select on *.* FROM 'user_foo';
--enable_abort_on_error

connection master;
delete from mysql.user where user="user_foo";
--source include/sync_slave_sql_with_master.inc

# Since changes to mysql.* are ignored, the revoke need to
# be done on slave as well
delete from mysql.user where user="user_foo";
--source include/rpl_end.inc

Man Man