rpl_log_pos.test 1.29 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
sync_slave_with_master;
7
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
8
--replace_column 1 # 33 #
9
show slave status;
10
stop slave;
11
change master to master_log_pos=73;
12
start slave;
unknown's avatar
unknown committed
13
sleep 5;
14
stop slave;
15

16
change master to master_log_pos=73;
17
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
18
--replace_column 1 # 33 #
19
show slave status;
20
start slave;
unknown's avatar
unknown committed
21
sleep 5;
22
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
23
--replace_column 1 # 33 #
24
show slave status;
25
stop slave;
26
change master to master_log_pos=173;
27
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
28
start slave;
29
sleep 2;
30
--replace_result 3306 MASTER_PORT 9306 MASTER_PORT 3334 MASTER_PORT 3336 MASTER_PORT
31
--replace_column 1 # 33 #
32 33 34
show slave status;
connection master;
show master status;
35 36 37 38
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);
unknown's avatar
unknown committed
39
save_master_pos;
40
connection slave;
41
stop slave;
42
change master to master_log_pos=79;
43
start slave;
unknown's avatar
unknown committed
44
sync_with_master;
45
select * from t1;
46
connection master;
47
drop table t1;
48
sync_slave_with_master;