summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgkodinov/kgeorge@magare.gmz <>2007-08-03 14:14:33 +0300
committergkodinov/kgeorge@magare.gmz <>2007-08-03 14:14:33 +0300
commit2bfbe2cd84e0895b2462c811e8eb3015953b503f (patch)
treee87f03dbc87436b0e11bd8f2e8a6c7cc45aa76b4
parentc076b6c12611d65c3f6a4e24e824d24a4e369b33 (diff)
downloadmariadb-git-2bfbe2cd84e0895b2462c811e8eb3015953b503f.tar.gz
Bug #25228: rpl_relayspace.test fails on powermacg5, vm-win2003-32-a
A test case was waiting for a fixed number of seconds for a specific state of the slave IO thread to take place. Fixed by waiting in a loop for that specific thread state instead (or timeout).
-rw-r--r--mysql-test/t/rpl_relayspace.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/rpl_relayspace.test b/mysql-test/t/rpl_relayspace.test
index 70315c14f34..d4ef2fe59bd 100644
--- a/mysql-test/t/rpl_relayspace.test
+++ b/mysql-test/t/rpl_relayspace.test
@@ -14,6 +14,22 @@ connection slave;
reset slave;
start slave io_thread;
# Give the I/O thread time to block.
+let $run= 1;
+let $counter= 300;
+while ($run)
+{
+ let $io_state= query_get_value("SHOW SLAVE STATUS", Slave_IO_State, 1);
+ if (`SELECT '$io_state' = 'Waiting for the slave SQL thread to free enough relay log space'`){
+ let $run= 0;
+ }
+ sleep 0.1;
+ if (!$counter){
+ --echo "Failed while waiting for slave IO thread block"
+ SHOW SLAVE STATUS;
+ exit;
+ }
+ dec $counter;
+}
sleep 2;
# A bug caused the I/O thread to refuse stopping.
stop slave io_thread;