List:Commits« Previous MessageNext Message »
From:Chuck Bell Date:February 8 2008 7:50pm
Subject:RE: bk commit into 6.0 tree (vvaintroub:1.2536) BUG#34381
View as plain text  
Patch approved. 

> -----Original Message-----
> From: vvaintroub@stripped [mailto:vvaintroub@stripped] 
> Sent: Thursday, February 07, 2008 13:58 PM
> To: commits@stripped
> Subject: bk commit into 6.0 tree (vvaintroub:1.2536) BUG#34381
> 
> Below is the list of changes that have just been committed 
> into a local 6.0 repository of vvaintroub. When vvaintroub 
> does a push these changes will be propagated to the main 
> repository and, within 24 hours after the push, to the public 
> repository.
> For information on how to access the public repository see 
> http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
> 
> ChangeSet@stripped, 2008-02-07 19:58:16+01:00, vvaintroub@wva. +2 -0
>   BUG#34381- Client application cannot connect to server on Vista.
>   The problem was that the server is creating an IPv6 socket 
> and listens
>   to IPv6-only traffic. If an older client application tries 
> to connect
>   server using IPv4 address (like 127.0.0.1 for local host), it fails.
>   
>   The solution is to clear IPV6_V6ONLY socket option before bind() -
>   in this case we'll have dual-mode socket that accepts both 
> IPv4 and IPv6
>   traffic.
>   
>    
> 
>   include/config-win.h@stripped, 2008-02-07 19:58:14+01:00, 
> vvaintroub@wva. +5 -0
>     Ensure IPV6_V6ONLY is defined, also when using pre-Vista 
> Platform SDKs
> 
>   sql/mysqld.cc@stripped, 2008-02-07 19:58:15+01:00, 
> vvaintroub@wva. +11 -1
>     Windows: IPv6 socket should handle both IPv6 and IPv4 traffic for 
>     compatibility with older clients
> 
> diff -Nrup a/include/config-win.h b/include/config-win.h
> --- a/include/config-win.h	2007-12-18 15:36:13 +01:00
> +++ b/include/config-win.h	2008-02-07 19:58:14 +01:00
> @@ -93,6 +93,11 @@ functions */
>  
>  #define S_IROTH		S_IREAD		/* for my_lib */
>  
> +/* Winsock2 constant (Vista SDK and later)*/ #ifndef IPV6_V6ONLY 
> +#define IPV6_V6ONLY 27 #endif
> +
>  #ifdef __BORLANDC__
>  #define FILE_BINARY	O_BINARY	/* my_fopen in binary mode */
>  #define O_TEMPORARY	0
> diff -Nrup a/sql/mysqld.cc b/sql/mysqld.cc
> --- a/sql/mysqld.cc	2008-01-29 08:50:45 +01:00
> +++ b/sql/mysqld.cc	2008-02-07 19:58:15 +01:00
> @@ -1657,7 +1657,17 @@ static void network_init(void)
>        user to open two mysqld servers with the same TCP/IP port.
>      */
>      (void) 
> setsockopt(ip_sock,SOL_SOCKET,SO_REUSEADDR,(char*)&arg,sizeof(arg));
> -#endif /* __WIN__ */
> +#else /* __WIN__ */
> +     /*
> +       For interoperability with older clients, IPv6 socket should
> +       listen on both IPv6 and IPv4 wildcard addresses.
> +       Remove IPV6_V6ONLY option.
> +     */
> +     arg= 0;
> +     if (ai->ai_family == AF_INET6)
> +        (void) setsockopt(ip_sock, IPPROTO_IPV6, 
> IPV6_V6ONLY, (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
> 
> 
> 
> --
> MySQL Code Commits Mailing List
> For list archives: http://lists.mysql.com/commits
> To unsubscribe:    
> http://lists.mysql.com/commits?unsub=1
> 

Thread
bk commit into 6.0 tree (vvaintroub:1.2536) BUG#34381vvaintroub7 Feb
  • RE: bk commit into 6.0 tree (vvaintroub:1.2536) BUG#34381Chuck Bell8 Feb