Debian Codegraph @

mysql-test/suite/engines/funcs/t/rpl_dual_pos_advance.test

raw
1 # This test checks that in a dual-head setup
2 # A->B->A, where A has --log-slave-updates (why would it?
3 # assume that there is a C as slave of A),
4 # then the Exec_master_log_pos of SHOW SLAVE STATUS does
5 # not stay too low on B(BUG#13023 due to events ignored because
6 # of their server id).
7 # It also will test BUG#13861.
8
9 --source include/master-slave.inc
10
11
12 # set up "dual head"
13
14 connection slave;
15 reset master;
16
17 connection master;
18 --replace_result $SLAVE_MYPORT SLAVE_PORT
19 eval change master to master_host="127.0.0.1",master_port=$SLAVE_MYPORT,master_user="root",master_ssl_verify_server_cert=0;
20
21 --source include/start_slave.inc
22
23 # now we test it
24
25 connection slave;
26
27 create table t1 (n int);
28
29 save_master_pos;
30 connection master;
31 sync_with_master;
32
33 # Now test BUG#13861. This will be enabled when Guilhem fixes this
34 # bug.
35
36 # stop slave
37
38 # create table t2 (n int); # create one ignored event
39
40 # save_master_pos;
41 # connection slave;
42 # sync_with_master;
43
44 # connection slave;
45
46 # show tables;
47
48 # save_master_pos;
49
50 # create table t3 (n int);
51
52 # connection master;
53
54 # bug is that START SLAVE UNTIL may stop too late, we test that by
55 # asking it to stop before creation of t3.
56
57 # start slave until master_log_file="slave-bin.000001",master_log_pos=195;
58
59 # wait until it's started (the position below is the start of "CREATE
60 # TABLE t2") (otherwise wait_for_slave_to_stop may return at once)
61
62 # select master_pos_wait("slave-bin.000001",137);
63
64 # wait_for_slave_to_stop;
65
66 # then BUG#13861 causes t3 to show up below (because stopped too
67 # late).
68
69 # show tables;
70
71 # --source include/start_slave.inc
72
73 # BUG#13023 is that Exec_master_log_pos may stay too low "forever":
74
75 connection master;
76
77 create table t4 (n int); # create 3 ignored events
78 create table t5 (n int);
79 create table t6 (n int);
80
81 --sync_slave_with_master
82
83 connection slave;
84
85 save_master_pos;
86
87 connection master;
88
89 # then BUG#13023 caused hang below ("master" looks behind, while it's
90 # not in terms of updates done).
91
92 sync_with_master;
93
94 show tables;
95
96 # cleanup
97
98 --source include/stop_slave.inc
99 reset slave;
100 drop table t1,t4,t5,t6; # add t2 and t3 later
101
102 --sync_slave_with_master
103 --source include/wait_for_slave_to_start.inc
104
105 # End of 4.1 tests
106 --source include/rpl_end.inc