RCAP_TYPE_STMT_OUTPUT needs complete packets
It was possible that a null buffer was passed to clientReply if the RCAP_TYPE_STMT_OUTPUT capability was needed and a partial packet was read.
This commit is contained in:
parent
78cc8f17b3
commit
a1009824a6
@ -839,6 +839,7 @@ static int gw_read_and_write(DCB* dcb)
|
||||
MySQLProtocol* proto = (MySQLProtocol*)dcb->protocol;
|
||||
|
||||
if (rcap_type_required(capabilities, RCAP_TYPE_PACKET_OUTPUT)
|
||||
|| rcap_type_required(capabilities, RCAP_TYPE_STMT_OUTPUT)
|
||||
|| rcap_type_required(capabilities, RCAP_TYPE_CONTIGUOUS_OUTPUT)
|
||||
|| proto->collect_result
|
||||
|| proto->ignore_replies != 0)
|
||||
@ -1039,6 +1040,7 @@ static int gw_read_and_write(DCB* dcb)
|
||||
&& !rcap_type_required(capabilities, RCAP_TYPE_RESULTSET_OUTPUT))
|
||||
{
|
||||
stmt = modutil_get_next_MySQL_packet(&read_buffer);
|
||||
mxb_assert_message(stmt, "There should be only complete packets in read_buffer");
|
||||
|
||||
if (stmt && !GWBUF_IS_CONTIGUOUS(stmt))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user