Fixed race condition that could cause diff to fail.
(Code taken from 5.5)
This commit is contained in:
parent
da223f146a
commit
dcce428640
@ -47,17 +47,9 @@ delimiter ;|
|
|||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
||||||
sleep 6;
|
|
||||||
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
||||||
sleep 6;
|
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
#Select in this test are used for debugging
|
|
||||||
#select * from test.t1;
|
|
||||||
#connection slave;
|
|
||||||
#select * from test.t1;
|
|
||||||
|
|
||||||
connection master;
|
|
||||||
SET AUTOCOMMIT=0;
|
SET AUTOCOMMIT=0;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
@ -65,18 +57,14 @@ INSERT INTO test.t1 VALUES (null,test.f1());
|
|||||||
--enable_warnings
|
--enable_warnings
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
SET AUTOCOMMIT=1;
|
SET AUTOCOMMIT=1;
|
||||||
#select * from test.t1;
|
|
||||||
#sleep 6;
|
|
||||||
|
|
||||||
#connection slave;
|
# Sync master and slave for all engines except NDB
|
||||||
#select * from test.t1;
|
if (`SELECT UPPER(LEFT('$engine_type', 3)) != 'NDB'`) {
|
||||||
|
sync_slave_with_master;
|
||||||
|
connection master;
|
||||||
|
}
|
||||||
|
|
||||||
#connection master;
|
# Time to dump the databases and so we can see if they match
|
||||||
|
|
||||||
#used for debugging
|
|
||||||
#show binlog events;
|
|
||||||
|
|
||||||
# time to dump the databases and so we can see if they match
|
|
||||||
|
|
||||||
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_master.sql
|
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_master.sql
|
||||||
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_slave.sql
|
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_slave.sql
|
||||||
@ -93,5 +81,8 @@ DROP TABLE test.t1;
|
|||||||
|
|
||||||
diff_files $MYSQLTEST_VARDIR/tmp/func003_master.sql $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
|
diff_files $MYSQLTEST_VARDIR/tmp/func003_master.sql $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
remove_file $MYSQLTEST_VARDIR/tmp/func003_master.sql;
|
||||||
|
remove_file $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
|
||||||
|
|
||||||
# End of 5.0 test case
|
# End of 5.0 test case
|
||||||
|
Loading…
x
Reference in New Issue
Block a user