Fix mxs_mysql_is_result_set

The function assumed that the packet payload was always at least two
bytes.
This commit is contained in:
Markus Mäkelä 2017-04-04 10:26:28 +03:00
parent 1ff83150f0
commit 860b14526c

View File

@ -1562,11 +1562,9 @@ bool mxs_mysql_is_result_set(GWBUF *buffer)
case MYSQL_REPLY_EOF:
/** Not a result set */
break;
default:
if (gwbuf_copy_data(buffer, MYSQL_HEADER_LEN + 1, 1, &cmd) && cmd > 1)
{
rval = true;
}
rval = true;
break;
}
}