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
16181618 private bool ShouldGetRealServerDetails ( ConnectionSettings cs )
16191619 {
16201620 // 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" )
16221622 return true ;
16231623
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 )
16261626 {
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 ) ;
16301630 }
16311631
16321632 return false ;
You can’t perform that action at this time.
0 commit comments