MXS-1411: fix error message and log priority
MXS-1411: fix error message and log priority
This commit is contained in:
@ -637,8 +637,27 @@ static int handle_expecting_nothing(MAXROWS_SESSION_DATA *csdata)
|
||||
{
|
||||
ss_dassert(csdata->state == MAXROWS_EXPECTING_NOTHING);
|
||||
ss_dassert(csdata->res.data);
|
||||
MXS_ERROR("Received data from the backend although we were expecting nothing.");
|
||||
ss_dassert(!true);
|
||||
unsigned long msg_size = gwbuf_length(csdata->res.data);
|
||||
|
||||
if ((int)MYSQL_GET_COMMAND(GWBUF_DATA(csdata->res.data)) == 0xff)
|
||||
{
|
||||
/**
|
||||
* Error text message is after:
|
||||
* MYSQL_HEADER_LEN offset + status flag (1) + error code (2) +
|
||||
* 6 bytes message status = MYSQL_HEADER_LEN + 9
|
||||
*/
|
||||
MXS_INFO("Error packet received from backend "
|
||||
"(possibly a server shut down ?): [%s].",
|
||||
GWBUF_DATA(csdata->res.data) + MYSQL_HEADER_LEN + 9);
|
||||
}
|
||||
else
|
||||
{
|
||||
MXS_WARNING("Received data from the backend although "
|
||||
"filter is expecting nothing. "
|
||||
"Packet size is %lu bytes long.",
|
||||
msg_size);
|
||||
ss_dassert(!true);
|
||||
}
|
||||
|
||||
return send_upstream(csdata);
|
||||
}
|
||||
|
Reference in New Issue
Block a user