MXS-1719: Fix hang on multi-statement UPDATE
When a multi-statement query consisting completely of UPDATE statements is received, the packets can be received in two separate buffers. To cope with this situation, the state change into REPLY_STATE_RSET_COLDEF must only be done if the buffer contains more than a single packet.
This commit is contained in:

committed by
Johan Wikman

parent
03310fa981
commit
9c6e15b426
@ -538,11 +538,10 @@ bool reply_is_complete(SRWBackend& backend, GWBUF *buffer)
|
|||||||
ss_dassert(mxs_mysql_is_ok_packet(buffer) &&
|
ss_dassert(mxs_mysql_is_ok_packet(buffer) &&
|
||||||
mxs_mysql_more_results_after_ok(buffer));
|
mxs_mysql_more_results_after_ok(buffer));
|
||||||
|
|
||||||
LOG_RS(backend, REPLY_STATE_RSET_COLDEF);
|
|
||||||
backend->set_reply_state(REPLY_STATE_RSET_COLDEF);
|
|
||||||
|
|
||||||
if (have_next_packet(buffer))
|
if (have_next_packet(buffer))
|
||||||
{
|
{
|
||||||
|
LOG_RS(backend, REPLY_STATE_RSET_COLDEF);
|
||||||
|
backend->set_reply_state(REPLY_STATE_RSET_COLDEF);
|
||||||
return reply_is_complete(backend, buffer);
|
return reply_is_complete(backend, buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user