1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

BUG#41708 rpl.rpl_flushlog_loop fails in pushbuild producing non-deterministic result file

If server has not been initialized as a slave (by CHANGE MASTER), then
SHOW SLAVE STATUS will return an empty set, and caused the waiting for
Slave_IO_running or Slave_SQL_running to 'No' fail.

This patch fixed the problem by return immediately if slave is not
initialized in include/wait_for_slave_*_to_stop.inc.


mysql-test/include/wait_for_slave_io_to_stop.inc:
  Return immediately if slave is not initialized
mysql-test/include/wait_for_slave_sql_to_stop.inc:
  Return immediately if slave is not initialized
mysql-test/include/wait_for_slave_to_stop.inc:
  Return immediately if slave is not initialized
This commit is contained in:
He Zhenxing
2008-12-26 16:20:29 +08:00
parent f8fe9e0953
commit dbb7b40cda
3 changed files with 36 additions and 18 deletions

View File

@ -11,8 +11,14 @@
# $slave_keep_connection. See wait_for_slave_param.inc for # $slave_keep_connection. See wait_for_slave_param.inc for
# descriptions. # descriptions.
let $slave_param= Slave_IO_Running; # if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
let $slave_param_value= No; # STATUS will return an empty set.
let $slave_error_message= Failed while waiting for slave IO thread to stop; let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1);
source include/wait_for_slave_param.inc; if (`SELECT '$_slave_io_running' != 'No such row'`)
let $slave_error_message= ; {
let $slave_param= Slave_IO_Running;
let $slave_param_value= No;
let $slave_error_message= Failed while waiting for slave IO thread to stop;
source include/wait_for_slave_param.inc;
let $slave_error_message= ;
}

View File

@ -11,8 +11,14 @@
# $slave_keep_connection. See wait_for_slave_param.inc for # $slave_keep_connection. See wait_for_slave_param.inc for
# descriptions. # descriptions.
let $slave_param= Slave_SQL_Running; # if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
let $slave_param_value= No; # STATUS will return an empty set.
let $slave_error_message= Failed while waiting for slave SQL thread to stop; let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1);
source include/wait_for_slave_param.inc; if (`SELECT '$_slave_io_running' != 'No such row'`)
let $slave_error_message= ; {
let $slave_param= Slave_SQL_Running;
let $slave_param_value= No;
let $slave_error_message= Failed while waiting for slave SQL thread to stop;
source include/wait_for_slave_param.inc;
let $slave_error_message= ;
}

View File

@ -11,14 +11,20 @@
# $slave_keep_connection. See wait_for_slave_param.inc for # $slave_keep_connection. See wait_for_slave_param.inc for
# descriptions. # descriptions.
let $slave_error_message= Failed while waiting for slave to stop; # if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
# STATUS will return an empty set.
let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1);
if (`SELECT '$_slave_io_running' != 'No such row'`)
{
let $slave_error_message= Failed while waiting for slave to stop;
let $slave_param= Slave_IO_Running; let $slave_param= Slave_IO_Running;
let $slave_param_value= No; let $slave_param_value= No;
source include/wait_for_slave_param.inc; source include/wait_for_slave_param.inc;
let $slave_param= Slave_SQL_Running; let $slave_param= Slave_SQL_Running;
let $slave_param_value= No; let $slave_param_value= No;
source include/wait_for_slave_param.inc; source include/wait_for_slave_param.inc;
let $slave_error_message= ; let $slave_error_message= ;
}