~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/include/wait_for_slave_io_to_stop.inc

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ==== Purpose ====
 
2
#
 
3
# Waits until the IO thread of the current connection has stopped, or
 
4
# until a timeout is reached.
 
5
#
 
6
# ==== Usage ====
 
7
#
 
8
# source include/wait_for_slave_io_to_stop.inc;
 
9
#
 
10
# Parameters to this macro are $slave_timeout and
 
11
# $master_connection. See wait_for_slave_param.inc for
 
12
# descriptions.
 
13
 
 
14
# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
 
15
# STATUS will return an empty set.
 
16
let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1);
 
17
if (`SELECT '$_slave_io_running' != 'No such row'`)
 
18
{
 
19
  let $slave_param= Slave_IO_Running;
 
20
  let $slave_param_value= No;
 
21
  let $slave_error_message= Failed while waiting for slave IO thread to stop;
 
22
  source include/wait_for_slave_param.inc;
 
23
  let $slave_error_message= ;
 
24
}