Commit d361c87c authored by unknown's avatar unknown

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)
parent a878a070
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment