summaryrefslogtreecommitdiff
path: root/mysql-test/suite/multi_source
diff options
context:
space:
mode:
authorElena Stepanova <elenst@ubuntu11.home>2012-10-05 00:36:17 +0400
committerElena Stepanova <elenst@ubuntu11.home>2012-10-05 00:36:17 +0400
commitac891c616c683d36aaf2bf002d91fa01ae484b6e (patch)
tree32626d46cb9bea5d51fea6f5091e7648df2b089e /mysql-test/suite/multi_source
parent1ab7dfe5196a75fefb78ebc58d5fbf12c8f5444d (diff)
downloadmariadb-git-ac891c616c683d36aaf2bf002d91fa01ae484b6e.tar.gz
Extra check for synchronization in the multi-source replication test
Diffstat (limited to 'mysql-test/suite/multi_source')
-rw-r--r--mysql-test/suite/multi_source/multisource.test8
-rw-r--r--mysql-test/suite/multi_source/wait_for_sql_thread_read_all.inc6
2 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/suite/multi_source/multisource.test b/mysql-test/suite/multi_source/multisource.test
index b9d26478282..e9d672a9ae3 100644
--- a/mysql-test/suite/multi_source/multisource.test
+++ b/mysql-test/suite/multi_source/multisource.test
@@ -26,6 +26,10 @@ set default_master_connection = 'master1';
--connection slave
--sync_with_master 0,'master1'
+# Here and further: add an extra check on SQL thread status
+# as the normal sync is not always enough
+--source wait_for_sql_thread_read_all.inc
+
# each of the 3 commands should produce
# 'master1' status
@@ -114,6 +118,8 @@ master_user='root';
start slave;
--source include/wait_for_slave_to_start.inc
+--source wait_for_sql_thread_read_all.inc
+
# See both connections in the same status output
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2
@@ -177,6 +183,8 @@ create table db1.t3 (f1 int) engine=InnoDB;
--connection slave
--sync_with_master 0,'master1'
+--source wait_for_sql_thread_read_all.inc
+
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2
show all slaves status;
diff --git a/mysql-test/suite/multi_source/wait_for_sql_thread_read_all.inc b/mysql-test/suite/multi_source/wait_for_sql_thread_read_all.inc
new file mode 100644
index 00000000000..ec5ecd0cb17
--- /dev/null
+++ b/mysql-test/suite/multi_source/wait_for_sql_thread_read_all.inc
@@ -0,0 +1,6 @@
+--let $show_statement = show all slaves status
+--let $field = Slave_SQL_State
+--let $condition = = 'Slave has read all relay log; waiting for the slave I/O thread to update it'
+--let $wait_for_all = 1
+--source include/wait_show_condition.inc
+