rpl_log_pos.test 1.16 KB
Newer Older
1 2 3
#
# Testing of setting slave to wrong log position with master_log_pos
#
4 5
source include/master-slave.inc;
show master status;
6
save_master_pos;
7
connection slave;
8
sync_with_master;
9
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
10
show slave status;
11
slave stop;
12
change master to master_log_pos=73;
13
slave start;
14
sleep 5;
15
slave stop;
16

17
change master to master_log_pos=73;
18
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
19 20
show slave status;
slave start;
21
sleep 5;
22
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
23
show slave status;
24
slave stop;
25
change master to master_log_pos=173;
26 27
slave start;
sleep 2;
28
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
29 30 31
show slave status;
connection master;
show master status;
32 33 34 35
create table if not exists t1 (n int);
drop table if exists t1;
create table t1 (n int);
insert into t1 values (1),(2),(3);
36
save_master_pos;
37
connection slave;
38
slave stop;
39
change master to master_log_pos=79;
40
slave start;
41
sync_with_master;
42
select * from t1;
43
connection master;
44
drop table t1;
45 46 47
save_master_pos;
connection slave;
sync_with_master;