You've already forked linux-packaging-mono
Imported Upstream version 4.3.2.467
Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
@@ -41,17 +41,19 @@ namespace System.Data.SqlClient
|
||||
SqlConnectionPoolKey key = (SqlConnectionPoolKey) poolKey;
|
||||
SqlInternalConnection result = null;
|
||||
SessionData recoverySessionData = null;
|
||||
SqlConnection sqlOwningConnection = owningConnection as SqlConnection;
|
||||
bool applyTransientFaultHandling = sqlOwningConnection != null ? sqlOwningConnection._applyTransientFaultHandling : false;
|
||||
|
||||
SqlConnectionString userOpt = null;
|
||||
if (userOptions != null) {
|
||||
userOpt = (SqlConnectionString)userOptions;
|
||||
}
|
||||
else if (owningConnection != null) {
|
||||
userOpt = (SqlConnectionString)(((SqlConnection)owningConnection).UserConnectionOptions);
|
||||
else if (sqlOwningConnection != null) {
|
||||
userOpt = (SqlConnectionString)(sqlOwningConnection.UserConnectionOptions);
|
||||
}
|
||||
|
||||
if (owningConnection != null) {
|
||||
recoverySessionData = ((SqlConnection)owningConnection)._recoverySessionData;
|
||||
if (sqlOwningConnection != null) {
|
||||
recoverySessionData = sqlOwningConnection._recoverySessionData;
|
||||
}
|
||||
|
||||
if (opt.ContextConnection) {
|
||||
@@ -63,7 +65,7 @@ namespace System.Data.SqlClient
|
||||
|
||||
// Pass DbConnectionPoolIdentity to SqlInternalConnectionTds if using integrated security.
|
||||
// Used by notifications.
|
||||
if (opt.IntegratedSecurity) {
|
||||
if (opt.IntegratedSecurity || opt.Authentication == SqlAuthenticationMethod.ActiveDirectoryIntegrated) {
|
||||
if (pool != null) {
|
||||
identity = pool.Identity;
|
||||
}
|
||||
@@ -90,7 +92,7 @@ namespace System.Data.SqlClient
|
||||
|
||||
|
||||
SqlConnectionString sseopt = new SqlConnectionString(opt, opt.DataSource, true /* user instance=true */, false /* set Enlist = false */);
|
||||
sseConnection = new SqlInternalConnectionTds(identity, sseopt, key.Credential, null, "", null, false);
|
||||
sseConnection = new SqlInternalConnectionTds(identity, sseopt, key.Credential, null, "", null, false, applyTransientFaultHandling: applyTransientFaultHandling);
|
||||
// NOTE: Retrieve <UserInstanceName> here. This user instance name will be used below to connect to the Sql Express User Instance.
|
||||
instanceName = sseConnection.InstanceName;
|
||||
|
||||
@@ -122,7 +124,7 @@ namespace System.Data.SqlClient
|
||||
opt = new SqlConnectionString(opt, instanceName, false /* user instance=false */, null /* do not modify the Enlist value */);
|
||||
poolGroupProviderInfo = null; // null so we do not pass to constructor below...
|
||||
}
|
||||
result = new SqlInternalConnectionTds(identity, opt, key.Credential, poolGroupProviderInfo, "", null, redirectedUserInstance, userOpt, recoverySessionData);
|
||||
result = new SqlInternalConnectionTds(identity, opt, key.Credential, poolGroupProviderInfo, "", null, redirectedUserInstance, userOpt, recoverySessionData, pool, key.AccessToken, applyTransientFaultHandling: applyTransientFaultHandling);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -157,7 +159,7 @@ namespace System.Data.SqlClient
|
||||
connectionTimeout = Int32.MaxValue;
|
||||
|
||||
poolingOptions = new DbConnectionPoolGroupOptions(
|
||||
opt.IntegratedSecurity,
|
||||
opt.IntegratedSecurity || opt.Authentication == SqlAuthenticationMethod.ActiveDirectoryIntegrated,
|
||||
opt.MinPoolSize,
|
||||
opt.MaxPoolSize,
|
||||
connectionTimeout,
|
||||
|
||||
Reference in New Issue
Block a user