MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rpl_connection.inc
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_connection_silent= 1]
14 # [--let $rpl_debug= 1]
15 # --source include/rpl_connection.inc
16 #
17 # Parameters:
18 # $rpl_connection_name
19 # Name of the connection to connect to.
20 #
21 # $rpl_connection_silent
22 # Do not print the connection name unless $rpl_debug is set.
23 #
24 # $rpl_debug
25 # By default, the connection name is printed only when this file
26 # is sourced from a top-level test script. If $rpl_debug is set,
27 # the connection name is also printed whenever auxiliary files
28 # like rpl_init.inc change connection.
29 
30 
31 if (!$rpl_connection_name)
32 {
33  --die ERROR IN TEST: you must set $rpl_connection_name before sourcing rpl_connection.inc
34 }
35 
36 # This is the same as "if (!$_rpl_include_file_depth || $rpl_debug)",
37 # but the mysqltest language doesn't have boolean operations.
38 
39 if ($rpl_debug)
40 {
41  --echo [connection $rpl_connection_name]
42 }
43 if (!$rpl_debug)
44 {
45  if (!$_include_file_depth)
46  {
47  if (!$rpl_connection_silent)
48  {
49  --echo [connection $rpl_connection_name]
50  }
51  }
52 }
53 
54 --connection $rpl_connection_name
55 --let $rpl_connection_name=