~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ==== Purpose ====
 
2
#
 
3
# Execute a .inc file once for each server that was configured as a
 
4
# slave by rpl_init.inc
 
5
#
 
6
#
 
7
# ==== Usage ====
 
8
#
 
9
# --let $rpl_source_file
 
10
# [--let $rpl_debug= 1]
 
11
# --source include/rpl_for_each_slave.inc
 
12
#
 
13
# Parameters:
 
14
#   $rpl_source_file
 
15
#     The file that will be sourced.
 
16
#
 
17
#   $rpl_debug
 
18
#     See include/rpl_init.inc
 
19
 
 
20
 
 
21
--let $include_filename= rpl_for_each_file.inc [$rpl_source_file]
 
22
--source include/begin_include_file.inc
 
23
 
 
24
--let $_rpl_server= $rpl_server_count
 
25
while ($_rpl_server)
 
26
{
 
27
  --let $_rpl_has_master= `SELECT SUBSTRING('$rpl_master_list', 1 + ($_rpl_server - 1) * $rpl_server_count_length, $rpl_server_count_length) != ''`
 
28
  if ($_rpl_has_master)
 
29
  {
 
30
    --let $rpl_connection_name= server_$_rpl_server
 
31
    --source include/rpl_connection.inc
 
32
    --source $rpl_source_file
 
33
  }
 
34
  --dec $_rpl_server
 
35
}
 
36
 
 
37
 
 
38
--let $include_filename= rpl_for_each_file.inc [$rpl_source_file]
 
39
--source include/end_include_file.inc