diff options
author | Manish Kumar <manish.4.kumar@oracle.com> | 2012-02-28 14:02:27 +0530 |
---|---|---|
committer | Manish Kumar <manish.4.kumar@oracle.com> | 2012-02-28 14:02:27 +0530 |
commit | be866add0622db4258a0659c1e01ea7ae2fb5445 (patch) | |
tree | 9774748c4ef8ccbaec37ddc401f9721cc4bc77e3 /sql/sys_vars.cc | |
parent | 91bd28c260cca6d77b9295ab0396963175db61f5 (diff) | |
parent | 83c8b1901871ef35f9bf7a792aa8e518f289c0d5 (diff) | |
download | mariadb-git-be866add0622db4258a0659c1e01ea7ae2fb5445.tar.gz |
BUG#13333431 - INCORRECT DEFAULT PORT IN 'SHOW SLAVE HOSTS' OUTPUT
Problem - The default port number shown in SHOW SLAVE HOSTS is always 3306
though the slave is actually listening on a different port number.
This is a problem as the user can not be sure whether this port
value can be trusted and so client trying to read replication
topology can get confused.
Fix - 3306 ceases to be the default value of report-port. Moreover report-port
does not have a static default any longer.
Instead we initialize report-port to 0 as the new default value and change
it based on two checks :
1) If report_port is not set, the slave reports the port number its listening
on. (i.e. if report-port is not set we get the actual value of the slave's
port number).
2) If report-port is set, we show the value report-port is set to, as the slave's
port number.
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r-- | sql/sys_vars.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 693beb87b8a..f15664bca10 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -2768,7 +2768,7 @@ static Sys_var_uint Sys_repl_report_port( "port or if you have a special tunnel from the master or other clients " "to the slave. If not sure, leave this option unset", READ_ONLY GLOBAL_VAR(report_port), CMD_LINE(REQUIRED_ARG), - VALID_RANGE(0, UINT_MAX), DEFAULT(MYSQL_PORT), BLOCK_SIZE(1)); + VALID_RANGE(0, UINT_MAX), DEFAULT(0), BLOCK_SIZE(1)); #endif static Sys_var_mybool Sys_keep_files_on_create( |