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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 08:30:45 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20120222083045-2rd53r4bnyx7qus4
Tags: 5.1.61-0ubuntu0.11.04.1
* SECURITY UPDATE: Update to 5.1.61 to fix multiple security issues
  (LP: #937869)
  - http://www.oracle.com/technetwork/topics/security/cpujan2012-366304.html
  - CVE-2011-2262
  - CVE-2012-0075
  - CVE-2012-0112
  - CVE-2012-0113
  - CVE-2012-0114
  - CVE-2012-0115
  - CVE-2012-0116
  - CVE-2012-0117
  - CVE-2012-0118
  - CVE-2012-0119
  - CVE-2012-0120
  - CVE-2012-0484
  - CVE-2012-0485
  - CVE-2012-0486
  - CVE-2012-0487
  - CVE-2012-0488
  - CVE-2012-0489
  - CVE-2012-0490
  - CVE-2012-0491
  - CVE-2012-0492
  - CVE-2012-0493
  - CVE-2012-0494
  - CVE-2012-0495
  - CVE-2012-0496

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ==== Purpose ====
 
2
#
 
3
# Create a connection to a given numbered server.
 
4
#
 
5
# This script is normally used internally by rpl_init.inc and
 
6
# master-slave.inc, but it can also be used in test cases that need to
 
7
# create more connections or re-create connections after disconnect.
 
8
#
 
9
#
 
10
# ==== Usage ====
 
11
#
 
12
# --let $rpl_connection_name= <connection_name>
 
13
# --let $rpl_server_number= <server_number>
 
14
# [--let $rpl_debug= 1]
 
15
# --source include/rpl_connect.inc
 
16
#
 
17
# Parameters:
 
18
#   $rpl_connection_name
 
19
#     The name of the connection to create.
 
20
#
 
21
#   $rpl_server_number
 
22
#     The number of the server to connect to.
 
23
#
 
24
#   $rpl_debug
 
25
#     See include/rpl_init.inc
 
26
 
 
27
 
 
28
--let $include_filename= rpl_connect.inc [creating $rpl_connection_name]
 
29
--source include/begin_include_file.inc
 
30
 
 
31
 
 
32
if (!$rpl_server_number)
 
33
{
 
34
  --die ERROR IN TEST: You must set $rpl_server_number before sourcing include/rpl_connect.inc
 
35
}
 
36
if (`SELECT '$rpl_connection_name' = ''`)
 
37
{
 
38
  --die ERROR IN TEST: You must set $rpl_connection_name before sourcing include/rpl_connect.inc
 
39
}
 
40
 
 
41
# Get port number
 
42
--let $_rpl_port= \$SERVER_MYPORT_$rpl_server_number
 
43
if (!$_rpl_port)
 
44
{
 
45
  --echo Bug in test case: '\$SERVER_MYPORT_$rpl_server_number' not initialized. Check the test's .cfg file.
 
46
  --die Not all SERVER_MYPORT_* environment variables are setup correctly.
 
47
}
 
48
 
 
49
# Create connection.
 
50
if ($rpl_debug)
 
51
{
 
52
  --echo connect ($rpl_connection_name,127.0.0.1,root,,test,$_rpl_port,)
 
53
}
 
54
--connect ($rpl_connection_name,127.0.0.1,root,,test,$_rpl_port,)
 
55
 
 
56
 
 
57
--let $include_filename= rpl_connect.inc
 
58
--source include/end_include_file.inc