From: Date: February 7 2008 7:58pm Subject: bk commit into 6.0 tree (vvaintroub:1.2536) BUG#34381 List-Archive: http://lists.mysql.com/commits/41887 X-Bug: 34381 Message-Id: <200802071858.m17IwZlS018985@mail.mysql.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Below is the list of changes that have just been committed into a local= =0A6.0 repository of vvaintroub. When vvaintroub does a push these changes= will=0Abe propagated to the main repository and, within 24 hours after= the=0Apush, to the public repository.=0AFor information on how to access= the public repository=0Asee http://dev.mysql.com/doc/mysql/en/installing-source-tree.html= =0A=0AChangeSet@stripped, 2008-02-07 19:58:16+01:00, vvaintroub@wva. +2 -0= =0A BUG#34381- Client application cannot connect to server on Vista.=0A= The problem was that the server is creating an IPv6 socket and listens= =0A to IPv6-only traffic. If an older client application tries to connect= =0A server using IPv4 address (like 127.0.0.1 for local host), it fails.= =0A =0A The solution is to clear IPV6_V6ONLY socket option before bind()= - =0A in this case we'll have dual-mode socket that accepts both IPv4= and IPv6=0A traffic.=0A =0A =0A=0A include/config-win.h@stripped, 2008-02-07= 19:58:14+01:00, vvaintroub@wva. +5 -0=0A Ensure IPV6_V6ONLY is defined,= also when using pre-Vista Platform SDKs=0A=0A sql/mysqld.cc@stripped, 2008-02-07= 19:58:15+01:00, vvaintroub@wva. +11 -1=0A Windows: IPv6 socket should= handle both IPv6 and IPv4 traffic for =0A compatibility with older clients= =0A=0Adiff -Nrup a/include/config-win.h b/include/config-win.h=0A--- a/include/config-win.h= 2007-12-18 15:36:13 +01:00=0A+++ b/include/config-win.h 2008-02-07 19:58:14= +01:00=0A@@ -93,6 +93,11 @@ functions */=0A =0A #define S_IROTH S_IREAD= /* for my_lib */=0A =0A+/* Winsock2 constant (Vista SDK and later)*/=0A+#ifndef= IPV6_V6ONLY=0A+#define IPV6_V6ONLY 27=0A+#endif=0A+=0A #ifdef __BORLANDC__= =0A #define FILE_BINARY O_BINARY /* my_fopen in binary mode */=0A #define= O_TEMPORARY 0=0Adiff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc=0A--- a/sql/mysqld.cc= 2008-01-29 08:50:45 +01:00=0A+++ b/sql/mysqld.cc 2008-02-07 19:58:15 +01:00= =0A@@ -1657,7 +1657,17 @@ static void network_init(void)=0A user to= open two mysqld servers with the same TCP/IP port.=0A */=0A (void)= setsockopt(ip_sock,SOL_SOCKET,SO_REUSEADDR,(char*)&arg,sizeof(arg));=0A-#endif= /* __WIN__ */=0A+#else /* __WIN__ */=0A+ /*=0A+ For interoperability= with older clients, IPv6 socket should=0A+ listen on both IPv6 and= IPv4 wildcard addresses.=0A+ Remove IPV6_V6ONLY option.=0A+ */= =0A+ arg=3D 0;=0A+ if (ai->ai_family =3D=3D AF_INET6)=0A+ = (void) setsockopt(ip_sock, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&arg,=0A+= sizeof(arg));=0A+#endif=0A /*=0A Sometimes the= port is not released fast enough when stopping and=0A restarting= the server. This happens quite often with the test suite=0A