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

« back to all changes in this revision

Viewing changes to mysql-test/include/sync_slave_io_with_master.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 slave IO thread has been synced, i.e., all events
 
4
# have been copied over to slave.  Does not care if the SQL thread is
 
5
# in sync.
 
6
#
 
7
#
 
8
# ==== Usage ====
 
9
#
 
10
# source include/sync_slave_io_with_master.inc;
 
11
#
 
12
# Syncs to the current position on master, as found by SHOW MASTER
 
13
# STATUS.
 
14
#
 
15
# Must be called on the master. Will change connection to the slave.
 
16
#
 
17
# Parameters to this macro are $slave_timeout and
 
18
# $master_connection. See wait_for_slave_param.inc for
 
19
# descriptions.
 
20
 
 
21
let $_master_file= query_get_value("SHOW MASTER STATUS", File, 1);
 
22
let $_master_pos= query_get_value("SHOW MASTER STATUS", Position, 1);
 
23
 
 
24
connection slave;
 
25
 
 
26
let $slave_error_message= Failed while waiting for slave IO thread to sync;
 
27
 
 
28
let $slave_param= Master_Log_File;
 
29
let $slave_param_value= $_master_file;
 
30
source include/wait_for_slave_param.inc;
 
31
 
 
32
let $slave_param= Read_Master_Log_Pos;
 
33
let $slave_param_value= $_master_pos;
 
34
source include/wait_for_slave_param.inc;
 
35
 
 
36
let $slave_error_message= ;