#At file:///home/bzr/fix-mysql-6.0-rpl/
2674 Mats Kindahl 2008-07-08
Bug #37939 rpl_row_stop_middle_update fails sporadically on pushbuild
Bug #37940 rpl_dual_pos_advance fails sporadically on pushbuild,fail wait_for_slave_to_stop
Bug #37941 rpl_flushlog_loop fails sporadically on pushbuild
Several tests fail when waiting for the slave to stop in what
appears to be timeouts caused by a timeout value set to low.
This causes false failures when the servers are loaded.
In order to try to avoid false negatives, we increase the
timeout 10 times and also print some more information in the
event that the slave fails to stop when expected to.
We add a printout of the current processes running to be able
to see if any process have been executing for an unexpectedly
long time, and also print the binlog events at the position
indicated by SHOW SLAVE STATUS.
modified:
mysql-test/include/wait_for_slave_sql_to_stop.inc
per-file messages:
mysql-test/include/wait_for_slave_sql_to_stop.inc
Increase the default timeout to 3000 and allow the timeout counter to be set.
On failure, print process list and also the events on the master following the
binary log position given by the show slave status, unless keep_connection is
set, in which case we just print the process list and the slave status.
=== modified file 'mysql-test/include/wait_for_slave_sql_to_stop.inc'
--- a/mysql-test/include/wait_for_slave_sql_to_stop.inc 2008-02-27 17:46:06 +0000
+++ b/mysql-test/include/wait_for_slave_sql_to_stop.inc 2008-07-08 13:36:55 +0000
@@ -8,6 +8,10 @@
# 2) loop through looking for
# sql threads to stop
# 3) If loops too long die.
+#
+# INPUT:
+# timeout_counter Number of 1/10 sec to wait
+# keep_connectio Do not do any "connect"
####################################################
if (!$keep_connection)
{
@@ -15,19 +19,39 @@ if (!$keep_connection)
}
let $row_number= 1;
let $run= 1;
-let $counter= 300;
+if (!$timeout_counter)
+{
+ let $timeout_counter= 3000;
+}
while ($run)
{
+ if (!$keep_connection)
+ {
+ if (!$timeout_counter)
+ {
+ connection slave;
+ let $binlog_pos = query_get_value("SHOW SLAVE STATUS", Exec_Master_Log_Pos, 1);
+ let $binlog_file = query_get_value("SHOW SLAVE STATUS", Master_Log_File, 1);
+ }
+ }
let $sql_result= query_get_value("SHOW SLAVE STATUS", Slave_SQL_Running, $row_number);
if (`SELECT '$sql_result' = 'No'`){
let $run= 0;
}
sleep 0.1;
- if (!$counter){
+ if (!$timeout_counter){
--echo "Failed while waiting for slave SQL thread to stop"
+ if (!$keep_connection)
+ {
+ connection master;
+ eval SHOW BINLOG EVENTS IN '$binlog_file' FROM $binlog_pos LIMIT 5;
+ connection slave;
+ }
+ --echo **** Note that the process list might have changed since the failure was detected ****
+ SHOW PROCESSLIST;
query_vertical SHOW SLAVE STATUS;
exit;
}
- dec $counter;
+ dec $timeout_counter;
}
| Thread |
|---|
| • bzr commit into mysql-6.0 branch (mats:2674) Bug#37939, Bug#37941, Bug#37940 | Mats Kindahl | 8 Jul |
| • Re: bzr commit into mysql-6.0 branch (mats:2674) Bug#37939, Bug#37941,Bug#37940 | Sven Sandberg | 8 Jul |
| • Re: bzr commit into mysql-6.0 branch (mats:2674) Bug#37939, Bug#37941,Bug#37940 | Mats Kindahl | 8 Jul |
| • Re: bzr commit into mysql-6.0 branch (mats:2674) Bug#37939, Bug#37941,Bug#37940 | Sven Sandberg | 8 Jul |
| • Re: bzr commit into mysql-6.0 branch (mats:2674) Bug#37939, Bug#37941,Bug#37940 | Mats Kindahl | 8 Jul |