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

« back to all changes in this revision

Viewing changes to mysql-test/include/rpl_connection.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
# The same as 'connection $rpl_connection_name', but it can also
 
4
# prints the connection name.  The connection is printed if $rpl_debug
 
5
# is set, or if rpl_connection.inc is not called between two
 
6
# invocations of begin_include_file.inc/end_include_file.inc.
 
7
# Otherwise the connection name is not printed.
 
8
#
 
9
#
 
10
# ==== Usage ====
 
11
#
 
12
# --let $rpl_connection_name= master
 
13
# [--let $rpl_debug= 1]
 
14
# --source include/rpl_connection.inc
 
15
#
 
16
# Parameters:
 
17
#   $rpl_connection_name
 
18
#     Name of the connection to connect to.
 
19
#
 
20
#   $rpl_debug
 
21
#     By default, the connection name is printed only when this file
 
22
#     is sourced from a top-level test script. If $rpl_debug is set,
 
23
#     the connection name is also printed whenever auxiliary files
 
24
#     like rpl_init.inc change connection.
 
25
 
 
26
 
 
27
if (!$rpl_connection_name)
 
28
{
 
29
  --die ERROR IN TEST: you must set $rpl_connection_name before sourcing rpl_connection.inc
 
30
}
 
31
 
 
32
# This is the same as "if (!$_rpl_include_file_depth || $rpl_debug)",
 
33
# but the mysqltest language doesn't have boolean operations.
 
34
 
 
35
if (!$_include_file_depth)
 
36
{
 
37
  --echo [connection $rpl_connection_name]
 
38
}
 
39
if ($_include_file_depth)
 
40
{
 
41
  if ($rpl_debug)
 
42
  {
 
43
    --echo [connection $rpl_connection_name]
 
44
  }
 
45
}
 
46
--connection $rpl_connection_name
 
47
--let $rpl_connection_name=