polardbxengine/mysql-test/suite/xcluster/t/replicate_before_flush.test

58 lines
1.3 KiB
Plaintext

--source include/have_debug_new.inc
--connect (conn1,127.0.0.1,root,,test,$MYPORT_1)
--connect (conn2,127.0.0.1,root,,test,$MYPORT_2)
--connect (conn3,127.0.0.1,root,,test,$MYPORT_3)
--connection conn1
set global consensus_replicate_with_cache_log=ON;
use test;
create table t1 (id int);
insert into t1 values (1);
--sleep 2
set global debug="+d,crash_before_flush_binlog";
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--error 2013
insert into t1 values (2);
--source include/wait_until_disconnected.inc
--sleep 10
--connection conn1
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--source include/start_mysqld.inc
--sleep 5
insert into t1 values (3);
--source include/wait_follower_catchup.inc
let $cnt1= query_get_value("select count(*) as cnt from t1", cnt, 1);
--connection conn2
--enable_reconnect
--source include/wait_until_connected_again_old.inc
--source include/wait_apply_catchup.inc
let $cnt2= query_get_value("select count(*) as cnt from t1", cnt, 1);
--connection conn3
--enable_reconnect
--source include/wait_until_connected_again_old.inc
--source include/wait_apply_catchup.inc
let $cnt3= query_get_value("select count(*) as cnt from t1", cnt, 1);
if ($cnt1 == $cnt2)
{
if ($cnt2 == $cnt3)
{
echo consistent!;
}
}
--connection conn1
drop table t1;
set global debug="";