Skip to content

Commit 69dc7d4

Browse files
committed
review feedback and misc fix
1 parent 2e92431 commit 69dc7d4

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDataReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3533,7 +3533,7 @@ private TdsOperationStatus TryNextResult(out bool more)
35333533
if (result != TdsOperationStatus.Done)
35343534
{
35353535
more = false;
3536-
return TdsOperationStatus.Done;
3536+
return result;
35373537
}
35383538

35393539
// In the case of not closing the reader, null out the metadata AFTER

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Packet.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System;
6+
using System.Diagnostics;
67

78
namespace Microsoft.Data.SqlClient
89
{
@@ -101,7 +102,7 @@ public int RequiredLength
101102
}
102103

103104
/// <summary>
104-
/// returns a boolean value indicating if there are enough total bytes availble in the <see cref="Buffer"/> to read the tds header
105+
/// returns a boolean value indicating if there are enough total bytes available in the <see cref="Buffer"/> to read the tds header
105106
/// </summary>
106107
public bool HasHeader => _totalLength >= TdsEnums.HEADER_LEN;
107108

@@ -139,6 +140,7 @@ public void CheckDisposed()
139140
}
140141
}
141142

143+
[Conditional("DEBUG")]
142144
internal void SetCreatedBy(int creator) => SetCreatedByImpl(creator);
143145

144146
partial void SetCreatedByImpl(int creator);

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2086,7 +2086,7 @@ internal void ReadSniSyncOverAsync()
20862086
}
20872087

20882088
PacketHandle readPacket = default;
2089-
bool readFromNetwork = PartialPacketContainsCompletePacket();
2089+
bool readFromNetwork = !PartialPacketContainsCompletePacket();
20902090
uint error;
20912091

20922092
RuntimeHelpers.PrepareConstrainedRegions();

0 commit comments

Comments
 (0)