summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorManish Kumar <manish.4.kumar@oracle.com>2012-04-10 11:44:17 +0530
committerManish Kumar <manish.4.kumar@oracle.com>2012-04-10 11:44:17 +0530
commit8465e5cf8827bb3ad937d2a238c3f8dbf98a31f0 (patch)
treeaa2a602d77966f3d445957ca89350fa9d6350a18 /mysql-test
parentbaec942a3f4c8cf8e703c366da68d4dc569d18a1 (diff)
downloadmariadb-git-8465e5cf8827bb3ad937d2a238c3f8dbf98a31f0.tar.gz
BUG#13812374 - RPL.RPL_REPORT_PORT FAILS OCCASIONALLY ON PB2
Problem - this failure occured in the test added for the fix of the bug-13333431. The basic problem of the failure was the value of the report_port which persisted even after the end of the test (ie. rpl_end.inc). So this causes the assertion in the test to fail if it is executed again. Fix - restarted the server with the default value being passed to the report_port after testing the two expected case so that in the next run of the test we will not encounter the previous value of report_port.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/rpl/r/rpl_report_port.result5
-rw-r--r--mysql-test/suite/rpl/t/rpl_report_port-slave.opt1
-rw-r--r--mysql-test/suite/rpl/t/rpl_report_port.test35
3 files changed, 30 insertions, 11 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_report_port.result b/mysql-test/suite/rpl/r/rpl_report_port.result
index ebdd3f889f3..d9887f41ff9 100644
--- a/mysql-test/suite/rpl/r/rpl_report_port.result
+++ b/mysql-test/suite/rpl/r/rpl_report_port.result
@@ -1,8 +1,11 @@
include/master-slave.inc
[connection master]
-include/assert.inc [The default value shown for the slave's port number is the actual port number of the slave.]
include/rpl_restart_server.inc [server_number=2 parameters: --report-port=9000]
include/start_slave.inc
[Slave restarted with the report-port set to some value]
include/assert.inc [The value shown for the slave's port number is 9000 which is the value set for report-port.]
+include/rpl_restart_server.inc [server_number=2 parameters: --report-port=]
+include/start_slave.inc
+[Slave restarted with the report-port set to the value of slave's port number]
+include/assert.inc [The default value shown for the slave's port number is the actual port number of the slave.]
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_report_port-slave.opt b/mysql-test/suite/rpl/t/rpl_report_port-slave.opt
deleted file mode 100644
index ffe2b2e7016..00000000000
--- a/mysql-test/suite/rpl/t/rpl_report_port-slave.opt
+++ /dev/null
@@ -1 +0,0 @@
---report-port=
diff --git a/mysql-test/suite/rpl/t/rpl_report_port.test b/mysql-test/suite/rpl/t/rpl_report_port.test
index b1b71a2982c..379f9aed946 100644
--- a/mysql-test/suite/rpl/t/rpl_report_port.test
+++ b/mysql-test/suite/rpl/t/rpl_report_port.test
@@ -10,22 +10,18 @@
#
#====Method====
#
-# Start replication with report port not set.This will give the actual port
-# number of the slave (ie. SLAVE_PORT) for the on doing SHOW SLAVE HOSTS on
-# the master.
-# Restart the slave server with report port set to 9000 and start the slave.
+# Start replication with report port set to 9000 and restart the slave.
# In this case on doing SHOW SLAVE HOSTS on the master, we get the port number
# of the slave to be 9000.
+# In the second case restart the slave server with report port not set. In this
+# case on doing SHOW SLAVE HOSTS on the master, we get the actual port number
+# of the slave (ie. SLAVE_PORT).
source include/master-slave.inc;
+source include/have_binlog_format_mixed.inc;
connection master;
---let $report_port= query_get_value(SHOW SLAVE HOSTS, Port, 1)
---let assert_text= The default value shown for the slave's port number is the actual port number of the slave.
---let assert_cond= $report_port = "$SLAVE_MYPORT"
---source include/assert.inc
-
# Start the server with some value being passed to the report_port= <option>
# this will be used incase we have to mask the value of the slave's port
# number in certain situations.
@@ -46,4 +42,25 @@ connection master;
--let assert_cond= $report_port = "9000"
--source include/assert.inc
+
+# Start the server with the report-port being passed with no value. So on SHOW SLAVE HOSTS
+# on the master the value of slave's port should be the actual value of the slave port.
+
+--let $rpl_server_number= 2
+--let $rpl_server_parameters= --report-port=
+--source include/rpl_restart_server.inc
+
+connection slave;
+--source include/start_slave.inc
+
+--echo [Slave restarted with the report-port set to the value of slave's port number]
+
+connection master;
+
+# The value reported is the actual value of the slave's port.
+--let $report_port= query_get_value(SHOW SLAVE HOSTS, Port, 1)
+--let assert_text= The default value shown for the slave's port number is the actual port number of the slave.
+--let assert_cond= $report_port = "$SLAVE_MYPORT"
+--source include/assert.inc
+
--source include/rpl_end.inc