rpl_log_pos.test 1.37 KB
Newer Older
1 2 3 4 5 6
##########
# Change Author: JBM
# Change Date: 2006-01-16
# Change: Added Order by for NDB
##########

7 8 9
#
# Testing of setting slave to wrong log position with master_log_pos
#
10 11 12

# Passes with rbr no problem, removed statement include [jbm]

13
source include/master-slave.inc;
14
--replace_column 3 <Binlog_Ignore_DB>
15
show master status;
16
sync_slave_with_master;
17
--replace_result $MASTER_MYPORT MASTER_PORT
18
--replace_column 1 # 8 # 9 # 23 # 33 #
19
show slave status;
20
stop slave;
21
change master to master_log_pos=75;
22
start slave;
23
sleep 5;
24
stop slave;
25

26
change master to master_log_pos=75;
27
--replace_result $MASTER_MYPORT MASTER_PORT
28
--replace_column 1 # 8 # 9 # 23 # 33 #
29
show slave status;
30
start slave;
31
sleep 5;
32
--replace_result $MASTER_MYPORT MASTER_PORT
33
--replace_column 1 # 8 # 9 # 23 # 33 #
34
show slave status;
35
stop slave;
36
change master to master_log_pos=178;
37
start slave;
38
sleep 2;
39
--replace_result $MASTER_MYPORT MASTER_PORT
40
--replace_column 1 # 8 # 9 # 23 # 33 #
41 42
show slave status;
connection master;
43
--replace_column 3 <Binlog_Ignore_DB>
44
show master status;
45 46 47 48
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);
49
save_master_pos;
50
connection slave;
51
stop slave;
52
change master to master_log_pos=106;
53
start slave;
54
sync_with_master;
55
select * from t1 ORDER BY n;
56
connection master;
57
drop table t1;
58
sync_slave_with_master;
59 60

# End of 4.1 tests