Skip to content

Commit 25d2413

Browse files
Fix | Fix trace string bug (#940)
1 parent ce4605d commit 25d2413

File tree

2 files changed

+24
-26
lines changed
  • src/Microsoft.Data.SqlClient

2 files changed

+24
-26
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12767,16 +12767,15 @@ internal string TraceString()
1276712767
{
1276812768
return string.Format(/*IFormatProvider*/ null,
1276912769
StateTraceFormatString,
12770-
null == _physicalStateObj ? bool.TrueString : bool.FalseString,
12771-
null == _pMarsPhysicalConObj ? bool.TrueString : bool.FalseString,
12770+
null == _physicalStateObj ? "(null)" : _physicalStateObj.ObjectID.ToString((IFormatProvider)null),
12771+
null == _pMarsPhysicalConObj ? "(null)" : _pMarsPhysicalConObj.ObjectID.ToString((IFormatProvider)null),
1277212772
_state,
1277312773
_server,
1277412774
_fResetConnection ? bool.TrueString : bool.FalseString,
1277512775
null == _defaultCollation ? "(null)" : _defaultCollation.TraceString(),
1277612776
_defaultCodePage,
1277712777
_defaultLCID,
1277812778
TraceObjectClass(_defaultEncoding),
12779-
"",
1278012779
_encryptionOption,
1278112780
null == _currentTransaction ? "(null)" : _currentTransaction.TraceString(),
1278212781
null == _pendingTransaction ? "(null)" : _pendingTransaction.TraceString(),

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13673,41 +13673,40 @@ internal ulong PlpBytesTotalLength(TdsParserStateObject stateObj)
1367313673
+ " _defaultCodePage = {6}\n\t"
1367413674
+ " _defaultLCID = {7}\n\t"
1367513675
+ " _defaultEncoding = {8}\n\t"
13676-
+ " _encryptionOption = {10}\n\t"
13677-
+ " _currentTransaction = {11}\n\t"
13678-
+ " _pendingTransaction = {12}\n\t"
13679-
+ " _retainedTransactionId = {13}\n\t"
13680-
+ " _nonTransactedOpenResultCount = {14}\n\t"
13681-
+ " _connHandler = {15}\n\t"
13682-
+ " _fMARS = {16}\n\t"
13683-
+ " _sessionPool = {17}\n\t"
13684-
+ " _isShiloh = {18}\n\t"
13685-
+ " _isShilohSP1 = {19}\n\t"
13686-
+ " _isYukon = {20}\n\t"
13687-
+ " _sniSpnBuffer = {21}\n\t"
13688-
+ " _errors = {22}\n\t"
13689-
+ " _warnings = {23}\n\t"
13690-
+ " _attentionErrors = {24}\n\t"
13691-
+ " _attentionWarnings = {25}\n\t"
13692-
+ " _statistics = {26}\n\t"
13693-
+ " _statisticsIsInTransaction = {27}\n\t"
13694-
+ " _fPreserveTransaction = {28}"
13695-
+ " _fParallel = {29}"
13676+
+ " _encryptionOption = {9}\n\t"
13677+
+ " _currentTransaction = {10}\n\t"
13678+
+ " _pendingTransaction = {11}\n\t"
13679+
+ " _retainedTransactionId = {12}\n\t"
13680+
+ " _nonTransactedOpenResultCount = {13}\n\t"
13681+
+ " _connHandler = {14}\n\t"
13682+
+ " _fMARS = {15}\n\t"
13683+
+ " _sessionPool = {16}\n\t"
13684+
+ " _isShiloh = {17}\n\t"
13685+
+ " _isShilohSP1 = {18}\n\t"
13686+
+ " _isYukon = {19}\n\t"
13687+
+ " _sniSpnBuffer = {20}\n\t"
13688+
+ " _errors = {21}\n\t"
13689+
+ " _warnings = {22}\n\t"
13690+
+ " _attentionErrors = {23}\n\t"
13691+
+ " _attentionWarnings = {24}\n\t"
13692+
+ " _statistics = {25}\n\t"
13693+
+ " _statisticsIsInTransaction = {26}\n\t"
13694+
+ " _fPreserveTransaction = {27}"
13695+
+ " _fParallel = {28}"
1369613696
;
1369713697
internal string TraceString()
1369813698
{
1369913699
return string.Format(/*IFormatProvider*/ null,
1370013700
StateTraceFormatString,
13701-
null == _physicalStateObj ? bool.TrueString : bool.FalseString,
13702-
null == _pMarsPhysicalConObj ? bool.TrueString : bool.FalseString,
13701+
null == _physicalStateObj ? "(null)" : _physicalStateObj.ObjectID.ToString((IFormatProvider)null),
13702+
null == _pMarsPhysicalConObj ? "(null)" : _pMarsPhysicalConObj.ObjectID.ToString((IFormatProvider)null),
1370313703
_state,
1370413704
_server,
1370513705
_fResetConnection ? bool.TrueString : bool.FalseString,
1370613706
null == _defaultCollation ? "(null)" : _defaultCollation.TraceString(),
1370713707
_defaultCodePage,
1370813708
_defaultLCID,
1370913709
TraceObjectClass(_defaultEncoding),
13710-
"",
1371113710
_encryptionOption,
1371213711
null == _currentTransaction ? "(null)" : _currentTransaction.TraceString(),
1371313712
null == _pendingTransaction ? "(null)" : _pendingTransaction.TraceString(),

0 commit comments

Comments
 (0)