List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:March 28 2008 5:15pm
Subject:wl4091 improving test patch
View as plain text  
Chuck, hi.

Please look at 2 changes of synchronization i disscussed with Serge on #rep.

The reason of the pb failure seems to be detected.

cheers,
Andrei

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2008/03/28 18:25:49+02:00 aelkin@mysql1000.(none) 
#   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
#   2008/03/28 18:25:48+02:00 aelkin@mysql1000.(none) +12 -6
#   refining a sychronization condition (2 times)
# 
diff -Nru a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test
b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test
--- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test	2008-03-28 18:35:05 +02:00
+++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test	2008-03-28 18:35:05 +02:00
@@ -45,25 +45,31 @@
 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
Thread
wl4091 improving test patchAndrei Elkin28 Mar