mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-28868 : wsrep_incoming_address status variable prints 0 as port number if the port is not mentioned in wsrep_node_incoming_address system variable
Problem was that mysqld_port is not set on set_ports() because it will be executed later. Fix is naturally fall back to MYSQL_PORT.
This commit is contained in:
parent
0c0a569028
commit
db7e04ed3a
1 changed files with 5 additions and 2 deletions
|
@ -652,11 +652,14 @@ static std::string wsrep_server_incoming_address()
|
|||
/*
|
||||
In case port is not specified in wsrep_node_incoming_address, we use
|
||||
mysqld_port.
|
||||
Note that we might get here before we execute set_ports().
|
||||
*/
|
||||
int port= (addr.get_port() > 0) ? addr.get_port() : (int) mysqld_port;
|
||||
int local_port= (addr.get_port() > 0) ? addr.get_port() : (int) mysqld_port;
|
||||
if (!local_port)
|
||||
local_port= MYSQL_PORT;
|
||||
const char *fmt= (addr.is_ipv6()) ? "[%s]:%u" : "%s:%u";
|
||||
|
||||
snprintf(inc_addr, inc_addr_max, fmt, addr.get_address(), port);
|
||||
snprintf(inc_addr, inc_addr_max, fmt, addr.get_address(), local_port);
|
||||
}
|
||||
|
||||
done:
|
||||
|
|
Loading…
Add table
Reference in a new issue