218 lines
5.4 KiB
Plaintext
218 lines
5.4 KiB
Plaintext
--source include/have_debug_new.inc
|
|
--connect (conn1,127.0.0.1,root,,test,$MYPORT_1)
|
|
--connection conn1
|
|
flush local logs;
|
|
--connect (conn2,127.0.0.1,root,,test,$MYPORT_2)
|
|
--connection conn2
|
|
flush local logs;
|
|
--connect (conn3,127.0.0.1,root,,test,$MYPORT_3)
|
|
--connection conn3
|
|
flush local logs;
|
|
|
|
--echo # --------- normal case -----------
|
|
--connection conn1
|
|
use test;
|
|
create table t1 (id int primary key, data longblob);
|
|
insert into t1 values (1, repeat("a", 2048576));
|
|
|
|
insert into t1 values (0, 'a');
|
|
--source include/wait_follower_catchup.inc
|
|
|
|
let $cnt1= query_get_value("select count(*) as cnt from t1", cnt, 1);
|
|
|
|
--connection conn2
|
|
|
|
--source include/wait_apply_catchup.inc
|
|
|
|
let $cnt2= query_get_value("select count(*) as cnt from t1", cnt, 1);
|
|
--connection conn3
|
|
|
|
--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!!!!!!!;
|
|
}
|
|
}
|
|
|
|
--echo # --------- case 1 ---------
|
|
--connection conn1
|
|
insert into t1 values (2, repeat("a", 2048576));
|
|
set global debug="+d,crash_during_large_event_binlog_flush";
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--error 2013
|
|
insert into t1 values (3, repeat("a", 2048576));
|
|
--source include/wait_until_disconnected.inc
|
|
--sleep 2
|
|
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--source include/start_mysqld.inc
|
|
|
|
insert into t1 values (13, 'a');
|
|
--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!!!!!!!;
|
|
}
|
|
}
|
|
|
|
--echo # --------- case 2 ---------
|
|
--connection conn1
|
|
insert into t1 values (4, repeat("a", 2048576));
|
|
set global debug="+d,crash_during_large_event_binlog_flush_slow";
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--error 2013
|
|
insert into t1 values (5, repeat("a", 2048576));
|
|
--source include/wait_until_disconnected.inc
|
|
--sleep 2
|
|
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
|
--source include/start_mysqld.inc
|
|
|
|
insert into t1 values (15, 'a');
|
|
--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!!!!!!!;
|
|
}
|
|
}
|
|
|
|
--echo # --------- case 3 ---------
|
|
--connection conn1
|
|
insert into t1 values (6, repeat("a", 2048576));
|
|
|
|
--connection conn2
|
|
set global debug="+d,crash_during_large_event_receive";
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
|
|
|
--connection conn1
|
|
insert into t1 values (7, repeat("a", 2048576));
|
|
|
|
--connection conn2
|
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
|
--enable_reconnect
|
|
--source include/wait_until_connected_again_old.inc
|
|
|
|
--connection conn1
|
|
insert into t1 values (8, repeat("a", 2048576));
|
|
|
|
insert into t1 values (18, 'a');
|
|
--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!!!!!!!;
|
|
}
|
|
}
|
|
|
|
--echo # --------- case 4 ---------
|
|
--connection conn1
|
|
insert into t1 values (9, repeat("a", 2048576));
|
|
|
|
--connection conn2
|
|
set global debug="+d,crash_during_large_event_receive_slow";
|
|
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
|
|
|
--connection conn1
|
|
insert into t1 values (10, repeat("a", 2048576));
|
|
|
|
--connection conn2
|
|
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
|
--enable_reconnect
|
|
--source include/wait_until_connected_again_old.inc
|
|
|
|
--connection conn1
|
|
insert into t1 values (11, repeat("a", 2048576));
|
|
|
|
insert into t1 values (111, 'a');
|
|
--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="";
|