File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1618,15 +1618,15 @@ internal sealed class SslClientAuthenticationOptions
1618
1618
private bool ShouldGetRealServerDetails ( ConnectionSettings cs )
1619
1619
{
1620
1620
// currently hardcoded to the version(s) returned by the Azure Database for MySQL proxy
1621
- if ( ServerVersion . OriginalString is "5.6.42 .0" or "5.6.39 .0" or "5.6.26 .0" )
1621
+ if ( ServerVersion . OriginalString is "5.6.47 .0" or "5.6.42 .0" or "5.6.39 .0" )
1622
1622
return true ;
1623
1623
1624
- // detect Azure Database for MySQL DNS suffixes
1625
- if ( cs . ConnectionProtocol == MySqlConnectionProtocol . Sockets && cs . HostNames ! . Count == 1 )
1624
+ // detect Azure Database for MySQL DNS suffixes, if a "user@host" user ID is being used
1625
+ if ( cs . ConnectionProtocol == MySqlConnectionProtocol . Sockets && cs . UserID . IndexOf ( '@' ) != - 1 )
1626
1626
{
1627
- return cs . HostNames [ 0 ] . EndsWith ( ".mysql.database.azure.com" , StringComparison . OrdinalIgnoreCase ) ||
1628
- cs . HostNames [ 0 ] . EndsWith ( ".database.windows.net" , StringComparison . OrdinalIgnoreCase ) ||
1629
- cs . HostNames [ 0 ] . EndsWith ( ".mysql.database.chinacloudapi.cn" , StringComparison . OrdinalIgnoreCase ) ;
1627
+ return HostName . EndsWith ( ".mysql.database.azure.com" , StringComparison . OrdinalIgnoreCase ) ||
1628
+ HostName . EndsWith ( ".database.windows.net" , StringComparison . OrdinalIgnoreCase ) ||
1629
+ HostName . EndsWith ( ".mysql.database.chinacloudapi.cn" , StringComparison . OrdinalIgnoreCase ) ;
1630
1630
}
1631
1631
1632
1632
return false ;
You can’t perform that action at this time.
0 commit comments