Fix sescmd debug assert
The assertion will not hold for COM_CHANGE_USER. This prevents the debug assertion but the actual backend code should also be changed.
This commit is contained in:
@ -86,7 +86,6 @@ void RWSplitSession::process_sescmd_response(SRWBackend& backend, GWBUF** ppPack
|
|||||||
{
|
{
|
||||||
if (backend->has_session_commands())
|
if (backend->has_session_commands())
|
||||||
{
|
{
|
||||||
mxb_assert(GWBUF_IS_COLLECTED_RESULT(*ppPacket));
|
|
||||||
uint8_t cmd;
|
uint8_t cmd;
|
||||||
gwbuf_copy_data(*ppPacket, MYSQL_HEADER_LEN, 1, &cmd);
|
gwbuf_copy_data(*ppPacket, MYSQL_HEADER_LEN, 1, &cmd);
|
||||||
uint8_t command = backend->next_session_command()->get_command();
|
uint8_t command = backend->next_session_command()->get_command();
|
||||||
@ -95,6 +94,8 @@ void RWSplitSession::process_sescmd_response(SRWBackend& backend, GWBUF** ppPack
|
|||||||
MXS_PS_RESPONSE resp = {};
|
MXS_PS_RESPONSE resp = {};
|
||||||
bool discard = true;
|
bool discard = true;
|
||||||
|
|
||||||
|
mxb_assert(GWBUF_IS_COLLECTED_RESULT(*ppPacket) || command == MXS_COM_CHANGE_USER);
|
||||||
|
|
||||||
if (command == MXS_COM_STMT_PREPARE && cmd != MYSQL_REPLY_ERR)
|
if (command == MXS_COM_STMT_PREPARE && cmd != MYSQL_REPLY_ERR)
|
||||||
{
|
{
|
||||||
// This should never fail or the backend protocol is broken
|
// This should never fail or the backend protocol is broken
|
||||||
|
|||||||
Reference in New Issue
Block a user