2
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
5
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
7
set session sql_log_bin=0;
8
delete from mysql.user where Host='fakehost';
9
set session sql_log_bin=1;
10
set session sql_log_bin=0;
11
delete from mysql.user where Host='fakehost';
12
set session sql_log_bin=1;
13
create user 'foo'@'fakehost';
14
create user 'foo'@'fakehost', 'bar'@'fakehost';
15
ERROR HY000: Operation CREATE USER failed for 'foo'@'fakehost'
16
create user 'foo'@'fakehost', 'bar'@'fakehost';
17
ERROR HY000: Operation CREATE USER failed for 'foo'@'fakehost','bar'@'fakehost'
18
select Host,User from mysql.user where Host='fakehost';
22
rename user 'foo'@'fakehost' to 'foofoo'@'fakehost';
23
rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost';
24
ERROR HY000: Operation RENAME USER failed for 'not_exist_user1'@'fakehost'
25
rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'not_exist_user2'@'fakehost' to 'barfoo'@'fakehost';
26
ERROR HY000: Operation RENAME USER failed for 'not_exist_user1'@'fakehost','not_exist_user2'@'fakehost'
27
select Host,User from mysql.user where Host='fakehost';
31
drop user 'foofoo'@'fakehost';
32
drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost';
33
ERROR HY000: Operation DROP USER failed for 'not_exist_user1'@'fakehost'
34
drop user 'not_exist_user1'@'fakehost', 'not_exist_user2'@'fakehost';
35
ERROR HY000: Operation DROP USER failed for 'not_exist_user1'@'fakehost','not_exist_user2'@'fakehost'
36
select Host,User from mysql.user where Host='fakehost';
38
show binlog events from <binlog_start>;
39
Log_name Pos Event_type Server_id End_log_pos Info
40
master-bin.000001 # Query # # use `test`; create user 'foo'@'fakehost'
41
master-bin.000001 # Query # # use `test`; create user 'foo'@'fakehost', 'bar'@'fakehost'
42
master-bin.000001 # Query # # use `test`; rename user 'foo'@'fakehost' to 'foofoo'@'fakehost'
43
master-bin.000001 # Query # # use `test`; rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost'
44
master-bin.000001 # Query # # use `test`; drop user 'foofoo'@'fakehost'
45
master-bin.000001 # Query # # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost'