summaryrefslogtreecommitdiff
path: root/mysql-test/include
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@oracle.com>2011-02-03 16:09:33 +0000
committerLuis Soares <luis.soares@oracle.com>2011-02-03 16:09:33 +0000
commit64b0591d7635ebf76a95eec6cfc74fea2c5f2731 (patch)
tree531f4c711355f4854e4543b2950b077692df55eb /mysql-test/include
parentc8de3bba8ed68b7cdbec26763cafe87746224850 (diff)
downloadmariadb-git-64b0591d7635ebf76a95eec6cfc74fea2c5f2731.tar.gz
BUG#59147: rpl_circular_for_4_hosts fails sporadically
There is one part of the test case that needs to break and re-establish the circular topology. For this the test stops the slave threads on a couple of servers and restarts them with START SLAVE. However, no check is done on the status of the IO or SQL threads before proceeding with the subsequent commands. Because rpl_only_running_threads is set to 1 this can lead to silently not syncing all slave threads as expected, ultimately resulting in unexpected results (and consequently on a failing test run). We fix this by replacing the START SLAVE instructions with calls to --source include/start_slave.inc, which will wait for the slave threads to be running (show 'Yes' in Slave_IO|SQL_Running fields of SHOW SLAVE STATUS) before proceeding. Additionally, we change rpl_sync.inc to make the IO thread report that it is running when its running status is any other than 'No'.
Diffstat (limited to 'mysql-test/include')
-rw-r--r--mysql-test/include/rpl_sync.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/include/rpl_sync.inc b/mysql-test/include/rpl_sync.inc
index a05bee23981..be2904528ff 100644
--- a/mysql-test/include/rpl_sync.inc
+++ b/mysql-test/include/rpl_sync.inc
@@ -88,7 +88,7 @@ while ($_rpl_i) {
{
--echo Sync IO: $_rpl_slave_io_running; Sync SQL: $_rpl_slave_sql_running
}
- --let $_rpl_slave_io_running= `SELECT IF('$_rpl_slave_io_running' = 'Yes', 1, '')`
+ --let $_rpl_slave_io_running= `SELECT IF('$_rpl_slave_io_running' != 'No', 1, '')`
--let $_rpl_slave_sql_running= `SELECT IF('$_rpl_slave_sql_running' = 'Yes', 1, '')`
if ($_rpl_slave_io_running)
{