Skip to content
Closed
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 @@ -198,6 +198,9 @@
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\OnChangedEventHandler.cs">
<Link>Microsoft\Data\SqlClient\OnChangedEventHandler.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Packet.cs">
<Link>Microsoft\Data\SqlClient\Packet.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\ParameterPeekAheadValue.cs">
<Link>Microsoft\Data\SqlClient\ParameterPeekAheadValue.cs</Link>
</Compile>
Expand Down Expand Up @@ -582,6 +585,9 @@
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParserStateObject.cs">
<Link>Microsoft\Data\SqlClient\TdsParserStateObject.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParserStateObject.Multiplexer.cs">
<Link>Microsoft\Data\SqlClient\TdsParserStateObject.Multiplexer.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\TdsParserStaticMethods.cs">
<Link>Microsoft\Data\SqlClient\TdsParserStaticMethods.cs</Link>
</Compile>
Expand Down Expand Up @@ -946,7 +952,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient.SNI.runtime" Version="$(MicrosoftDataSqlClientSNIRuntimeVersion)" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryVersion)" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsCachingMemoryVersion)" />
<!-- Enable the project reference for debugging purposes. -->
<!-- <ProjectReference Include="$(SqlServerSourceCode)\Microsoft.SqlServer.Server.csproj" /> -->
<PackageReference Include="Microsoft.SqlServer.Server" Version="$(MicrosoftSqlServerServerVersion)" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1607,9 +1607,9 @@ private object InternalEndExecuteNonQuery(IAsyncResult asyncResult, bool isInter
{
bool dataReady;
Debug.Assert(_stateObj._syncOverAsync, "Should not attempt pends in a synchronous call");
bool result = _stateObj.Parser.TryRun(RunBehavior.UntilDone, this, null, null, _stateObj,
TdsOperationStatus result = _stateObj.Parser.TryRun(RunBehavior.UntilDone, this, null, null, _stateObj,
out dataReady);
if (!result)
if (result != TdsOperationStatus.Done)
{
throw SQL.SynchronousCallMayNotPend();
}
Expand Down Expand Up @@ -3682,9 +3682,11 @@ private Task RunExecuteNonQueryTds(string methodName, bool isAsync, int timeout,
{
bool dataReady;
Debug.Assert(_stateObj._syncOverAsync, "Should not attempt pends in a synchronous call");
bool result = _stateObj.Parser.TryRun(RunBehavior.UntilDone, this, null, null, _stateObj, out dataReady);
if (!result)
{ throw SQL.SynchronousCallMayNotPend(); }
TdsOperationStatus result = _stateObj.Parser.TryRun(RunBehavior.UntilDone, this, null, null, _stateObj, out dataReady);
if (result != TdsOperationStatus.Done)
{
throw SQL.SynchronousCallMayNotPend();
}
}
}
catch (Exception e)
Expand Down Expand Up @@ -5136,9 +5138,11 @@ private SqlDataReader RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavi
Task executeTask = _stateObj.Parser.TdsExecuteSQLBatch(optionSettings, timeout, this.Notification, _stateObj, sync: true);
Debug.Assert(executeTask == null, "Shouldn't get a task when doing sync writes");
Debug.Assert(_stateObj._syncOverAsync, "Should not attempt pends in a synchronous call");
bool result = _stateObj.Parser.TryRun(RunBehavior.UntilDone, this, null, null, _stateObj, out bool dataReady);
if (!result)
{ throw SQL.SynchronousCallMayNotPend(); }
TdsOperationStatus result = _stateObj.Parser.TryRun(RunBehavior.UntilDone, this, null, null, _stateObj, out bool dataReady);
if (result != TdsOperationStatus.Done)
{
throw SQL.SynchronousCallMayNotPend();
}
// and turn OFF when the ds exhausts the stream on Close()
optionSettings = GetResetOptionsString(cmdBehavior);
}
Expand Down Expand Up @@ -5296,9 +5300,11 @@ private void FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, stri
{
bool dataReady;
Debug.Assert(_stateObj._syncOverAsync, "Should not attempt pends in a synchronous call");
bool result = _stateObj.Parser.TryRun(RunBehavior.UntilDone, this, ds, null, _stateObj, out dataReady);
if (!result)
{ throw SQL.SynchronousCallMayNotPend(); }
TdsOperationStatus result = _stateObj.Parser.TryRun(RunBehavior.UntilDone, this, ds, null, _stateObj, out dataReady);
if (result != TdsOperationStatus.Done)
{
throw SQL.SynchronousCallMayNotPend();
}
}
catch (Exception e)
{
Expand Down
Loading