summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@sun.com>2009-06-26 12:18:50 +0100
committerLuis Soares <luis.soares@sun.com>2009-06-26 12:18:50 +0100
commita48020acbe7126a6d4cfa267f9a4e84b62a7e402 (patch)
treeefa31d5d59de925a6bda5cfe4465154d02c9a18c
parent59947ae6bdd81a62b2682163cb430520b54c0551 (diff)
parent0fdebc8c49a14685b8ff1cc79f1379f0415ecf5a (diff)
downloadmariadb-git-a48020acbe7126a6d4cfa267f9a4e84b62a7e402.tar.gz
local merge: 5.1-bt bug branch --> 5.1-bt latest
-rw-r--r--mysql-test/extra/rpl_tests/rpl_reset_slave.test4
-rw-r--r--mysql-test/include/wait_for_slave_io_error.inc23
2 files changed, 25 insertions, 2 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_reset_slave.test b/mysql-test/extra/rpl_tests/rpl_reset_slave.test
index 49a142f10c2..1f88c792fce 100644
--- a/mysql-test/extra/rpl_tests/rpl_reset_slave.test
+++ b/mysql-test/extra/rpl_tests/rpl_reset_slave.test
@@ -58,7 +58,7 @@ echo *** errno must be zero: $last_io_errno ***;
change master to master_user='impossible_user_name';
start slave;
-source include/wait_for_slave_io_to_stop.inc;
+source include/wait_for_slave_io_error.inc;
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
--disable_query_log
eval SELECT $last_io_errno > 0 as ONE;
@@ -79,7 +79,7 @@ let $last_io_error= query_get_value(SHOW SLAVE STATUS, Last_IO_Error, 1);
source include/stop_slave.inc;
change master to master_user='impossible_user_name';
start slave;
-source include/wait_for_slave_io_to_stop.inc;
+source include/wait_for_slave_io_error.inc;
let $last_io_errno= query_get_value(SHOW SLAVE STATUS, Last_IO_Errno, 1);
--disable_query_log
eval SELECT $last_io_errno > 0 as ONE;
diff --git a/mysql-test/include/wait_for_slave_io_error.inc b/mysql-test/include/wait_for_slave_io_error.inc
new file mode 100644
index 00000000000..094406e02b2
--- /dev/null
+++ b/mysql-test/include/wait_for_slave_io_error.inc
@@ -0,0 +1,23 @@
+# ==== Purpose ====
+#
+# Waits until the IO thread of the current connection has got an
+# error, or until a timeout is reached.
+#
+# ==== Usage ====
+#
+# source include/wait_for_slave_io_error.inc;
+#
+# Parameters to this macro are $slave_timeout and
+# $slave_keep_connection. See wait_for_slave_param.inc for
+# descriptions.
+
+let $old_slave_param_comparison= $slave_param_comparison;
+
+let $slave_param= Last_IO_Errno;
+let $slave_param_comparison= !=;
+let $slave_param_value= 0;
+let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread;
+source include/wait_for_slave_param.inc;
+let $slave_error_message= ;
+
+let $slave_param_comparison= $old_slave_param_comparison;