#At file:///media/sdb2/hezx/work/mysql/bzrwork/b41707/6.0-rpl/
2772 He Zhenxing 2008-12-29 [merge]
Merge patch of BUG#41708 from 5.1-rpl
modified:
mysql-test/include/wait_for_slave_io_to_stop.inc
mysql-test/include/wait_for_slave_sql_to_stop.inc
mysql-test/include/wait_for_slave_to_stop.inc
=== modified file 'mysql-test/include/wait_for_slave_io_to_stop.inc'
--- a/mysql-test/include/wait_for_slave_io_to_stop.inc 2008-07-10 16:09:39 +0000
+++ b/mysql-test/include/wait_for_slave_io_to_stop.inc 2008-12-26 08:20:29 +0000
@@ -11,8 +11,14 @@
# $slave_keep_connection. See wait_for_slave_param.inc for
# descriptions.
-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= ;
+# 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_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= ;
+}
=== modified file 'mysql-test/include/wait_for_slave_sql_to_stop.inc'
--- a/mysql-test/include/wait_for_slave_sql_to_stop.inc 2008-07-10 16:09:39 +0000
+++ b/mysql-test/include/wait_for_slave_sql_to_stop.inc 2008-12-26 08:20:29 +0000
@@ -11,8 +11,14 @@
# $slave_keep_connection. See wait_for_slave_param.inc for
# descriptions.
-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= ;
+# 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_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= ;
+}
=== modified file 'mysql-test/include/wait_for_slave_to_stop.inc'
--- a/mysql-test/include/wait_for_slave_to_stop.inc 2008-08-04 14:30:50 +0000
+++ b/mysql-test/include/wait_for_slave_to_stop.inc 2008-12-29 09:58:13 +0000
@@ -11,14 +11,20 @@
# $slave_keep_connection. See wait_for_slave_param.inc for
# 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_value= No;
-source include/wait_for_slave_param.inc;
+ let $slave_param= Slave_IO_Running;
+ let $slave_param_value= No;
+ source include/wait_for_slave_param.inc;
-let $slave_param= Slave_SQL_Running;
-let $slave_param_value= No;
-source include/wait_for_slave_param.inc;
+ let $slave_param= Slave_SQL_Running;
+ let $slave_param_value= No;
+ source include/wait_for_slave_param.inc;
-let $slave_error_message= ;
+ let $slave_error_message= ;
+}
| Thread |
|---|
| • bzr commit into mysql-6.0-rpl branch (zhenxing.he:2772) Bug#41708 | He Zhenxing | 29 Dec |