Handle trailing unexpected ERR packets
RWBackend did not expect that a resultset and an unexpected ERR packet could be stored in the same buffer. This can happen for example if a server shuts down immediately after the resultset is sent.
This commit is contained in:
@ -315,9 +315,16 @@ void RWBackend::process_packets(GWBUF* result)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case REPLY_STATE_DONE:
|
case REPLY_STATE_DONE:
|
||||||
|
if (cmd == MYSQL_REPLY_ERR)
|
||||||
|
{
|
||||||
|
// Unexpected error at the end of a resultset, possibly a killed connection
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// This should never happen
|
// This should never happen
|
||||||
MXS_ERROR("Unexpected result state. cmd: 0x%02hhx, len: %u", cmd, len);
|
MXS_ERROR("Unexpected result state. cmd: 0x%02hhx, len: %u", cmd, len);
|
||||||
mxb_assert(!true);
|
mxb_assert(!true);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case REPLY_STATE_RSET_COLDEF:
|
case REPLY_STATE_RSET_COLDEF:
|
||||||
|
|||||||
Reference in New Issue
Block a user