~james-page/ubuntu/precise/mysql-5.5/misc-fixes

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_report_port.test

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-06-11 07:34:33 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120611073433-l9za2ni4ipp848y3
Tags: 5.5.24-0ubuntu0.12.04.1
* SECURITY UPDATE: Update to 5.5.24 to fix security issues (LP: #1011371)
  - http://dev.mysql.com/doc/refman/5.5/en/news-5-5-24.html

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
#BUG#13333431 : INCORRECT DEFAULT PORT IN 'SHOW SLAVE HOSTS' OUTPUT 
 
3
#
 
4
# ==== Purpose ====
 
5
#
 
6
# The test show the default value printed for the slave's port number if the 
 
7
# --report-port= <some value> is not set on the slave. This is different from
 
8
# the present scenario which show 3306 as the default value if the report-port 
 
9
# is not set on the slave. 
 
10
#
 
11
#====Method====
 
12
#
 
13
# Start replication  with report port set to 9000 and restart the slave.
 
14
# In this case on doing SHOW SLAVE HOSTS on the master, we get the port number
 
15
# of the slave to be 9000.
 
16
# In the second case restart the slave server with report port not set. In this
 
17
# case on doing SHOW SLAVE HOSTS on the master, we get the actual port number
 
18
# of the slave (ie. SLAVE_PORT).
 
19
 
 
20
source include/master-slave.inc;
 
21
source include/have_binlog_format_mixed.inc;
 
22
 
 
23
connection master;
 
24
 
 
25
# Start the server with some value being passed to the report_port= <option>
 
26
# this will be used incase we have to mask the value of the slave's port
 
27
# number in certain situations.
 
28
 
 
29
--let $rpl_server_number= 2
 
30
--let $rpl_server_parameters= --report-port=9000
 
31
--source include/rpl_restart_server.inc
 
32
 
 
33
connection slave;
 
34
--source include/start_slave.inc
 
35
 
 
36
--echo [Slave restarted with the report-port set to some value]
 
37
connection master;
 
38
 
 
39
# 9000 is the value of the port we should get.
 
40
--let $report_port= query_get_value(SHOW SLAVE HOSTS, Port, 1)
 
41
--let assert_text= The value shown for the slave's port number is 9000 which is the value set for report-port.
 
42
--let assert_cond= $report_port = "9000"
 
43
--source include/assert.inc
 
44
 
 
45
 
 
46
# Start the server with the report-port being passed with no value. So on SHOW SLAVE HOSTS
 
47
# on the master the value of slave's port should be the actual value of the slave port.
 
48
 
 
49
--let $rpl_server_number= 2
 
50
--let $rpl_server_parameters= --report-port=
 
51
--source include/rpl_restart_server.inc
 
52
 
 
53
connection slave;
 
54
--source include/start_slave.inc
 
55
 
 
56
--echo [Slave restarted with the report-port set to the value of slave's port number]
 
57
 
 
58
connection master;
 
59
 
 
60
# The value reported is the actual value of the slave's port.
 
61
--let $report_port= query_get_value(SHOW SLAVE HOSTS, Port, 1)
 
62
--let assert_text= The default value shown for the slave's port number is the actual port number of the slave.
 
63
--let assert_cond= $report_port = "$SLAVE_MYPORT"
 
64
--source include/assert.inc
 
65
 
 
66
--source include/rpl_end.inc