2
#BUG#13333431 : INCORRECT DEFAULT PORT IN 'SHOW SLAVE HOSTS' OUTPUT
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.
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).
20
source include/master-slave.inc;
21
source include/have_binlog_format_mixed.inc;
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.
29
--let $rpl_server_number= 2
30
--let $rpl_server_parameters= --report-port=9000
31
--source include/rpl_restart_server.inc
34
--source include/start_slave.inc
36
--echo [Slave restarted with the report-port set to some value]
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
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.
49
--let $rpl_server_number= 2
50
--let $rpl_server_parameters= --report-port=
51
--source include/rpl_restart_server.inc
54
--source include/start_slave.inc
56
--echo [Slave restarted with the report-port set to the value of slave's port number]
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
66
--source include/rpl_end.inc