Debian Codegraph @

tests/t/t_online_3tier_slave.sh

raw symbols SCIP
1 . ./init.shscip-shell source . . `./init.sh`.
2
3 mysql $M test -e "insert into t1 values(2, 200, 'aaaaaa')"
4 sleepscip-shell system . . sleep. 1
5 is_gtid_supported
6 if testscip-shell system . . test. $? = 0
7 then
8 mysql $S1 -e "reset master"
9 fi
10 mysql $S2 -e "stop slave"
11 is_gtid_supported
12 if testscip-shell system . . test. $? = 1
13 then
14 mysql $S2 -e "change master to master_host='127.0.0.1', master_port=$S1P, master_user='rsandbox', master_password='rsandbox'"
15 else
16 mysql $S2 -e "change master to master_host='127.0.0.1', master_port=$S1P, master_user='rsandbox', master_password='rsandbox', master_log_file='mysql-bin.000001', master_log_pos=4"
17 fi
18 mysql $S2 -e "start slave"
19
20 check_master $0 $S2P $S1P
21
22 masterha_master_switch --master_state=alive --interactive=0 --conf=$CONF --new_master_host=127.0.0.1 --new_master_port=$S1P > switch.log 2>&1
23 fail_if_zero $0 $?
24
25 masterha_master_switch --master_state=alive --interactive=0 --conf=mha_test_multi.cnf --new_master_host=127.0.0.1 --new_master_port=$S1P > switch.log 2>&1
26 fail_if_zero $0 $?
27
28 mysql $S1 -e "set global read_only=1"
29
30 masterha_master_switch --master_state=alive --interactive=0 --conf=$CONF --new_master_host=127.0.0.1 --new_master_port=$S1P > switch.log 2>&1
31 fail_if_zero $0 $?
32
33 masterha_master_switch --master_state=alive --interactive=0 --conf=mha_test_multi_online.cnf --new_master_host=127.0.0.1 --new_master_port=$S1P --orig_master_is_new_slave > switch.log 2>&1
34 fail_if_nonzero $0 $?
35
36 check_master $0 $S2P $S1P
37 check_master $0 $MP $S1P
38 mysql $S1 test -e "insert into t1 values(10000003, 300, 'bbbaaaaaaa');"
39 check_count $0 $MP 3
40 ./check $0 3