Skip to content

Commit 926da7b

Browse files
[Release 2.1] Fix Trace String bug (#941)
1 parent ff19a0b commit 926da7b

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -12788,16 +12788,15 @@ internal string TraceString()
1278812788
{
1278912789
return string.Format(/*IFormatProvider*/ null,
1279012790
StateTraceFormatString,
12791-
null == _physicalStateObj ? bool.TrueString : bool.FalseString,
12792-
null == _pMarsPhysicalConObj ? bool.TrueString : bool.FalseString,
12791+
null == _physicalStateObj ? "(null)" : _physicalStateObj.ObjectID.ToString((IFormatProvider)null),
12792+
null == _pMarsPhysicalConObj ? "(null)" : _pMarsPhysicalConObj.ObjectID.ToString((IFormatProvider)null),
1279312793
_state,
1279412794
_server,
1279512795
_fResetConnection ? bool.TrueString : bool.FalseString,
1279612796
null == _defaultCollation ? "(null)" : _defaultCollation.TraceString(),
1279712797
_defaultCodePage,
1279812798
_defaultLCID,
1279912799
TraceObjectClass(_defaultEncoding),
12800-
"",
1280112800
_encryptionOption,
1280212801
null == _currentTransaction ? "(null)" : _currentTransaction.TraceString(),
1280312802
null == _pendingTransaction ? "(null)" : _pendingTransaction.TraceString(),

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

+22-23
Original file line numberDiff line numberDiff line change
@@ -13667,41 +13667,40 @@ internal ulong PlpBytesTotalLength(TdsParserStateObject stateObj)
1366713667
+ " _defaultCodePage = {6}\n\t"
1366813668
+ " _defaultLCID = {7}\n\t"
1366913669
+ " _defaultEncoding = {8}\n\t"
13670-
+ " _encryptionOption = {10}\n\t"
13671-
+ " _currentTransaction = {11}\n\t"
13672-
+ " _pendingTransaction = {12}\n\t"
13673-
+ " _retainedTransactionId = {13}\n\t"
13674-
+ " _nonTransactedOpenResultCount = {14}\n\t"
13675-
+ " _connHandler = {15}\n\t"
13676-
+ " _fMARS = {16}\n\t"
13677-
+ " _sessionPool = {17}\n\t"
13678-
+ " _isShiloh = {18}\n\t"
13679-
+ " _isShilohSP1 = {19}\n\t"
13680-
+ " _isYukon = {20}\n\t"
13681-
+ " _sniSpnBuffer = {21}\n\t"
13682-
+ " _errors = {22}\n\t"
13683-
+ " _warnings = {23}\n\t"
13684-
+ " _attentionErrors = {24}\n\t"
13685-
+ " _attentionWarnings = {25}\n\t"
13686-
+ " _statistics = {26}\n\t"
13687-
+ " _statisticsIsInTransaction = {27}\n\t"
13688-
+ " _fPreserveTransaction = {28}"
13689-
+ " _fParallel = {29}"
13670+
+ " _encryptionOption = {9}\n\t"
13671+
+ " _currentTransaction = {10}\n\t"
13672+
+ " _pendingTransaction = {11}\n\t"
13673+
+ " _retainedTransactionId = {12}\n\t"
13674+
+ " _nonTransactedOpenResultCount = {13}\n\t"
13675+
+ " _connHandler = {14}\n\t"
13676+
+ " _fMARS = {15}\n\t"
13677+
+ " _sessionPool = {16}\n\t"
13678+
+ " _isShiloh = {17}\n\t"
13679+
+ " _isShilohSP1 = {18}\n\t"
13680+
+ " _isYukon = {19}\n\t"
13681+
+ " _sniSpnBuffer = {20}\n\t"
13682+
+ " _errors = {21}\n\t"
13683+
+ " _warnings = {22}\n\t"
13684+
+ " _attentionErrors = {23}\n\t"
13685+
+ " _attentionWarnings = {24}\n\t"
13686+
+ " _statistics = {25}\n\t"
13687+
+ " _statisticsIsInTransaction = {26}\n\t"
13688+
+ " _fPreserveTransaction = {27}"
13689+
+ " _fParallel = {28}"
1369013690
;
1369113691
internal string TraceString()
1369213692
{
1369313693
return string.Format(/*IFormatProvider*/ null,
1369413694
StateTraceFormatString,
13695-
null == _physicalStateObj ? bool.TrueString : bool.FalseString,
13696-
null == _pMarsPhysicalConObj ? bool.TrueString : bool.FalseString,
13695+
null == _physicalStateObj ? "(null)" : _physicalStateObj.ObjectID.ToString((IFormatProvider)null),
13696+
null == _pMarsPhysicalConObj ? "(null)" : _pMarsPhysicalConObj.ObjectID.ToString((IFormatProvider)null),
1369713697
_state,
1369813698
_server,
1369913699
_fResetConnection ? bool.TrueString : bool.FalseString,
1370013700
null == _defaultCollation ? "(null)" : _defaultCollation.TraceString(),
1370113701
_defaultCodePage,
1370213702
_defaultLCID,
1370313703
TraceObjectClass(_defaultEncoding),
13704-
"",
1370513704
_encryptionOption,
1370613705
null == _currentTransaction ? "(null)" : _currentTransaction.TraceString(),
1370713706
null == _pendingTransaction ? "(null)" : _pendingTransaction.TraceString(),

0 commit comments

Comments
 (0)