[Commits] c6a38fd: MDEV-10646 - System Unit File After network-online

Sergey Vojtovich svoj at mariadb.org
Tue Mar 7 13:07:50 EET 2017


revision-id: c6a38fd974d43aa9094e215969fa3598c595f7b0 (mariadb-10.1.21-50-gc6a38fd)
parent(s): e6aa08ced29d4dab120ae2dc8c08f6b3b81e0c93
committer: Sergey Vojtovich
timestamp: 2017-03-07 15:06:01 +0400
message:

MDEV-10646 - System Unit File After network-online

Bind to an address even if it is not yet configured.

---
 sql/mysqld.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 9060788..2607307 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2520,6 +2520,12 @@ static MYSQL_SOCKET activate_tcp_port(uint port)
                                    (char*)&arg, sizeof(arg));
   }
 #endif
+
+#ifdef IP_FREEBIND
+  arg= 1;
+  (void) mysql_socket_setsockopt(ip_sock, IPPROTO_IP, IP_FREEBIND, (char*) &arg,
+                                 sizeof(arg));
+#endif
   /*
     Sometimes the port is not released fast enough when stopping and
     restarting the server. This happens quite often with the test suite


More information about the commits mailing list