Debian Codegraph @

tests/t/t_online_busy.sh

raw symbols SCIP
1 . ./init.shscip-shell source . . `./init.sh`.
2
3 masterha_master_switch --master_state=alive --interactive=0 --conf=mha_test_online.cnf --new_master_host=127.0.0.1 --new_master_port=$S1P --orig_master_is_new_slave --check_only > switch.log 2>&1
4 fail_if_nonzero $0 $?
5 check_master $0 $S1P $MP
6
7 mysql $M -e "create database if not exists mysqlslap"
8 sleepscip-shell system . . sleep. 1
9 mysqlslap --host=127.0.0.1 --port=$S1P --concurrency=15 --query="select sleep(100)" > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 &
10 pid=$!
11
12 sleepscip-shell system . . sleep. 15
13 masterha_master_switch --master_state=alive --interactive=0 --conf=mha_test_online.cnf --new_master_host=127.0.0.1 --new_master_port=$S1P --orig_master_is_new_slave > switch.log 2>&1
14 rc=$?
15 killscip-shell system . . kill. $pid
16 wait $pid 2> /dev/nullscip-shell filesystem . . `/dev/null`.
17 fail_if_zero $0 $rc
18 sleepscip-shell system . . sleep. 10
19
20 mysql $M test -e "lock tables t1 write; select sleep(100)" > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 &
21 pid2=$!
22 sleepscip-shell system . . sleep. 1
23 mysql $M test -e "lock tables t1 write" > /dev/nullscip-shell filesystem . . `/dev/null`. 2>&1 &
24 pid3=$!
25 sleepscip-shell system . . sleep. 2
26
27 masterha_master_switch --master_state=alive --interactive=0 --conf=mha_test_online.cnf --new_master_host=127.0.0.1 --new_master_port=$S1P --orig_master_is_new_slave --flush_tables=0 > switch.log 2>&1
28 rc=$?
29 killscip-shell system . . kill. $pid2
30 wait $pid2 2> /dev/nullscip-shell filesystem . . `/dev/null`.
31 killscip-shell system . . kill. $pid3
32 wait $pid3 2> /dev/nullscip-shell filesystem . . `/dev/null`.
33 fail_if_zero $0 $rc
34 sleepscip-shell system . . sleep. 5
35
36 masterha_master_switch --master_state=alive --interactive=0 --conf=mha_test_online.cnf --new_master_host=127.0.0.1 --new_master_port=$S1P --orig_master_is_new_slave > switch.log 2>&1
37 fail_if_nonzero $0 $?
38 mysql $S1 test -e "insert into t1 values(10000003, 300, 'bbbaaaaaaa');"
39 check_master $0 $MP $S1P
40 check_count $0 $MP 2
41 ./check $0 2
42