diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs index 8217604c72..2cf50fd7ba 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs @@ -1962,7 +1962,8 @@ internal static bool IsValidTdsToken(byte token) token == TdsEnums.SQLSSPI || token == TdsEnums.SQLFEATUREEXTACK || token == TdsEnums.SQLSESSIONSTATE || - token == TdsEnums.SQLFEDAUTHINFO); + token == TdsEnums.SQLFEDAUTHINFO || + token == TdsEnums.SQLDEBUG_CMD ); } // Main parse loop for the top-level tds tokens, calls back into the I*Handler interfaces @@ -2040,8 +2041,9 @@ internal bool TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataRead { case TdsEnums.SQLERROR: case TdsEnums.SQLINFO: + case TdsEnums.SQLDEBUG_CMD: { - if (token == TdsEnums.SQLERROR) + if (token == TdsEnums.SQLERROR || token == TdsEnums.SQLDEBUG_CMD) // This the value of 0x60 send fromm TDS Control token { stateObj.HasReceivedError = true; // Keep track of the fact error token was received - for Done processing. } @@ -3909,7 +3911,8 @@ internal bool TryProcessError(byte token, TdsParserStateObject stateObj, out Sql } Debug.Assert(((errorClass >= TdsEnums.MIN_ERROR_CLASS) && token == TdsEnums.SQLERROR) || - ((errorClass < TdsEnums.MIN_ERROR_CLASS) && token == TdsEnums.SQLINFO), "class and token don't match!"); + ((errorClass < TdsEnums.MIN_ERROR_CLASS) && token == TdsEnums.SQLINFO) || + ((errorClass < TdsEnums.MIN_ERROR_CLASS) && token == TdsEnums.SQLDEBUG_CMD ), "class and token don't match!"); if (!stateObj.TryReadUInt16(out shortLen)) { diff --git a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsEnums.cs b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsEnums.cs index 81c2ed1570..8c8c253ece 100644 --- a/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsEnums.cs +++ b/src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsEnums.cs @@ -149,7 +149,7 @@ internal static class TdsEnums public const byte SQLDONEINPROC = 0xff; public const byte SQLOFFSET = 0x78; public const byte SQLORDER = 0xa9; - public const byte SQLDEBUG_CMD = 0x60; + public const byte SQLDEBUG_CMD = 0x60; // This needs more info public const byte SQLLOGINACK = 0xad; public const byte SQLFEATUREEXTACK = 0xae; // TDS 7.4 - feature ack public const byte SQLSESSIONSTATE = 0xe4; // TDS 7.4 - connection resiliency session state