1
# BUG#33862 completely failed DROP USER statement gets replicated
3
--source include/master-slave.inc
6
# remove all users will be used in the test
9
set session sql_log_bin=0;
10
delete from mysql.user where Host='fakehost';
11
set session sql_log_bin=1;
14
set session sql_log_bin=0;
15
delete from mysql.user where Host='fakehost';
16
set session sql_log_bin=1;
22
create user 'foo'@'fakehost';
23
--error ER_CANNOT_USER
24
create user 'foo'@'fakehost', 'bar'@'fakehost';
25
--error ER_CANNOT_USER
26
create user 'foo'@'fakehost', 'bar'@'fakehost';
28
sync_slave_with_master;
29
select Host,User from mysql.user where Host='fakehost';
35
rename user 'foo'@'fakehost' to 'foofoo'@'fakehost';
36
--error ER_CANNOT_USER
37
rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost';
38
--error ER_CANNOT_USER
39
rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'not_exist_user2'@'fakehost' to 'barfoo'@'fakehost';
41
sync_slave_with_master;
42
select Host,User from mysql.user where Host='fakehost';
48
drop user 'foofoo'@'fakehost';
49
--error ER_CANNOT_USER
50
drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost';
51
--error ER_CANNOT_USER
52
drop user 'not_exist_user1'@'fakehost', 'not_exist_user2'@'fakehost';
54
sync_slave_with_master;
55
select Host,User from mysql.user where Host='fakehost';
58
# show the binlog events on the master
61
source include/show_binlog_events.inc;