From 911e325d095865d8dc087d18343f5ee81c224265 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 18:25:49 +0200 Subject: [PATCH] wl#4091 improving a test that shows a failure. the wait condition was for data in tables but the log positions are updates after the data are unlocked. So there was a time window [after_table_unlock_for_select, log_pos_updated] where the orig cond was true but log position might be changed. the correct one is to expect the last pos of the slave's insert in the output of show_slave_status on the master. mysql-test/suite/rpl/t/rpl_flushlog_loop.test: refining a sychronization condition (2 times) --- mysql-test/suite/rpl/t/rpl_flushlog_loop.test | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test index f9f01855aa9..caead008169 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test @@ -45,25 +45,31 @@ CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM; let $wait_binlog_event= CREATE TABLE t1; --source include/wait_for_binlog_event.inc sync_slave_with_master; + connection master; INSERT INTO t1 VALUE(1); --enable_query_log FLUSH LOGS; +let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1); + connection slave; -let $wait_condition= SELECT COUNT(*) = 1 FROM t1; --- source include/wait_condition.inc +let $slave_param= Exec_Master_Log_Pos; +source include/wait_for_slave_param.inc; + --disable_query_log INSERT INTO t1 VALUE(2); +let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1); --enable_query_log + connection master; -let $wait_condition= SELECT COUNT(*) = 2 FROM t1; --- source include/wait_condition.inc +let $slave_param= Exec_Master_Log_Pos; +source include/wait_for_slave_param.inc; + --enable_query_log # # Show status of slave # -let $pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); ---replace_result $SLAVE_MYPORT SLAVE_PORT $pos POSITION +--replace_result $SLAVE_MYPORT SLAVE_PORT $slave_param_value POSITION --replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 # --query_vertical SHOW SLAVE STATUS