stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
**** On Master ****
CREATE USER dummy@localhost;
CREATE USER dummy1@localhost, dummy2@localhost;
SELECT user, host FROM mysql.user WHERE user like 'dummy%';
user	host
dummy	localhost
dummy1	localhost
dummy2	localhost
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
3
**** On Slave ****
SELECT user,host FROM mysql.user WHERE user like 'dummy%';
user	host
dummy	localhost
dummy1	localhost
dummy2	localhost
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
3
**** On Master ****
DROP USER nonexisting@localhost;
ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost'
DROP USER nonexisting@localhost, dummy@localhost;
ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost'
DROP USER dummy1@localhost, dummy2@localhost;
SELECT user, host FROM mysql.user WHERE user like 'dummy%';
user	host
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
0
**** On Slave ****
SELECT user,host FROM mysql.user WHERE user like 'dummy%';
user	host
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
0
