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:
parent
42412149bd
commit
092286297e
@ -538,11 +538,10 @@ bool reply_is_complete(SRWBackend& backend, GWBUF *buffer)
|
||||
ss_dassert(mxs_mysql_is_ok_packet(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))
|
||||
{
|
||||
LOG_RS(backend, REPLY_STATE_RSET_COLDEF);
|
||||
backend->set_reply_state(REPLY_STATE_RSET_COLDEF);
|
||||
return reply_is_complete(backend, buffer);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user