Fix for MXS-335

Response handling as aborted if there is not enough data.
This commit is contained in:
Johan Wikman 2015-08-27 12:51:25 +03:00
parent 45227c8875
commit b6f5108d29

View File

@ -551,6 +551,18 @@ static int gw_read_backend_event(DCB *dcb) {
rc = 0;
goto return_rc;
}
if (!read_buffer) {
LOGIF(LM, (skygw_log_write_flush(
LOGFILE_MESSAGE,
"%lu [gw_read_backend_event] "
"Read buffer unexpectedly null, even though response "
"not marked as complete. User: %s",
pthread_self(),
current_session->user)));
rc = 0;
goto return_rc;
}
}
/**
* Check that session is operable, and that client DCB is
@ -1562,9 +1574,10 @@ static GWBUF* process_response_data (
* enough data to read the packet length.
*/
init_response_status(readbuf, srvcmd, &npackets_left, &nbytes_left);
initial_packets = npackets_left;
initial_bytes = nbytes_left;
}
initial_packets = npackets_left;
initial_bytes = nbytes_left;
}
/** Only session commands with responses should be processed */
ss_dassert(npackets_left > 0);