1
--source include/master-slave.inc
3
############################################################################
4
# Test case for BUG#10780
7
# A slave without replication privileges should have Slave_IO_Running = No
9
# 1. Create new replication user
11
grant replication slave on *.* to rpl@127.0.0.1 identified by 'rpl';
13
sync_slave_with_master;
16
change master to master_user='rpl',master_password='rpl';
19
# 2. Do replication as new user
22
drop table if exists t1;
24
create table t1 (n int);
25
insert into t1 values (1);
31
# 3. Delete new replication user
32
# note: drop user will be replicated on slave
34
drop user rpl@127.0.0.1;
36
sync_slave_with_master;
38
# 4. Restart slave without privileges
39
# (slave.err will contain access denied error for this START SLAVE command)
43
# 5. Make sure Slave_IO_Running = No
44
--replace_result $MASTER_MYPORT MASTER_MYPORT
45
# Column 1 is replaced, since the output can be either
46
# "Connecting to master" or "Waiting for master update"
47
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 35 # 36 #
51
# Cleanup (Note that slave IO thread is not running)
54
# cleanup: slave io thread has been stopped "irrecoverably"
55
# so we clean up mess manually