Fix EOF packet calculation for large rows
The EOF packet calculation function in modutil.cc didn't handle the case where the payload exceeded maximum packet size and could mistake binary data for a ERR packet. The state of a multi-packet payload is now exposed by the modutil_count_signal_packets function. This allows proper handling of large multi-packet payloads. Added minor improvements to mxs1110_16mb to handle testing of this change.
This commit is contained in:
@ -523,8 +523,10 @@ bool reply_is_complete(SRWBackend backend, GWBUF *buffer)
|
||||
else
|
||||
{
|
||||
bool more = false;
|
||||
bool skip = backend->get_skip_packet();
|
||||
int old_eof = backend->get_reply_state() == REPLY_STATE_RSET_ROWS ? 1 : 0;
|
||||
int n_eof = modutil_count_signal_packets(buffer, old_eof, &more);
|
||||
int n_eof = modutil_count_signal_packets(buffer, old_eof, &more, &skip);
|
||||
backend->set_skip_packet(skip);
|
||||
|
||||
if (n_eof == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user