Skip to content

Commit 19629eb

Browse files
committed
MDEV-10646 - System Unit File After network-online
Bind to an address even if it is not yet configured.
1 parent fa13747 commit 19629eb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sql/mysqld.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2520,6 +2520,12 @@ static MYSQL_SOCKET activate_tcp_port(uint port)
25202520
(char*)&arg, sizeof(arg));
25212521
}
25222522
#endif
2523+
2524+
#ifdef IP_FREEBIND
2525+
arg= 1;
2526+
(void) mysql_socket_setsockopt(ip_sock, IPPROTO_IP, IP_FREEBIND, (char*) &arg,
2527+
sizeof(arg));
2528+
#endif
25232529
/*
25242530
Sometimes the port is not released fast enough when stopping and
25252531
restarting the server. This happens quite often with the test suite

0 commit comments

Comments
 (0)