Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3144,7 +3144,7 @@ internal void ReadSni(TaskCompletionSource<object> completion)
// the identity source. The identity value is used to correlate timer callback events to the currently
// running timeout and prevents a late timer callback affecting a result it does not relate to
int previousTimeoutState = Interlocked.CompareExchange(ref _timeoutState, TimeoutState.Running, TimeoutState.Stopped);
Debug.Assert(previousTimeoutState == TimeoutState.Stopped, "previous timeout state was not Stopped");

if (previousTimeoutState == TimeoutState.Stopped)
{
Debug.Assert(_timeoutIdentityValue == 0, "timer was previously stopped without resetting the _identityValue");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,10 +595,21 @@ public static string GetUniqueNameForSqlServer(string prefix, bool withBracket =
Environment.MachineName,
DateTime.Now.ToString("yyyy_MM_dd", CultureInfo.InvariantCulture));
string name = GetUniqueName(extendedPrefix, withBracket);
if (name.Length > 128)

// Truncate to no more than 128 characters.
const int maxLen = 128;
if (name.Length > maxLen)
{
throw new ArgumentOutOfRangeException("the name is too long - SQL Server names are limited to 128");
if (withBracket)
{
name = name.Substring(0, maxLen - 1) + ']';
}
else
{
name = name.Substring(0, maxLen);
}
}

return name;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
<Compile Include="SQL\AsyncTest\BeginExecAsyncTest.cs" />
<Compile Include="SQL\AsyncTest\BeginExecReaderAsyncTest.cs" />
<Compile Include="SQL\AsyncTest\XmlReaderAsyncTest.cs" />
<Compile Include="SQL\AsyncTest\AsyncTest.cs" />
<Compile Include="SQL\AsyncTest\AsyncCancelledConnectionsTest.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TestSet)' == '' OR '$(TestSet)' == '2'">
Expand Down

This file was deleted.

Loading
Loading