40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
select connected from information_schema.alisql_cluster_health order by 1;
|
|
|
|
create table t (id int);
|
|
insert into t values (1);
|
|
--source include/wait_follower_catchup.inc
|
|
|
|
--connect (follower,127.0.0.1,root,,test,$MYPORT_2)
|
|
--connection follower
|
|
--enable_reconnect
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
|
--shutdown_server
|
|
--source include/wait_until_disconnected.inc
|
|
|
|
--connection default
|
|
insert into t values (2);
|
|
# wait send log
|
|
--sleep 1
|
|
# wait catchup
|
|
let $wait_condition= select match_index = applied_index from information_schema.alisql_cluster_global where server_id=3;
|
|
--source include/wait_condition.inc
|
|
|
|
select connected, log_delay_num, apply_delay_num from information_schema.alisql_cluster_health order by 1,2,3;
|
|
|
|
--connection follower
|
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
|
--source include/wait_until_connected_again_old.inc
|
|
|
|
--connection default
|
|
insert into t values (3);
|
|
--source include/wait_follower_catchup.inc
|
|
|
|
select connected, log_delay_num, apply_delay_num from information_schema.alisql_cluster_health order by 1,2,3;
|
|
|
|
#select at follower
|
|
--connection follower
|
|
select connected, log_delay_num, apply_delay_num from information_schema.alisql_cluster_health order by 1,2,3;
|
|
|
|
--connection default
|
|
drop table t;
|