Fixed queries getting stuck when the SSL records were of the maximum allowed size.

This commit is contained in:
Markus Makela
2015-06-05 11:00:51 +03:00
parent cc1f720ea3
commit e83799648a
3 changed files with 48 additions and 40 deletions

View File

@ -789,7 +789,7 @@ int gw_read_client_event(
nbytes_read = gwbuf_length(dcb->dcb_readqueue);
data = (uint8_t *)GWBUF_DATA(dcb->dcb_readqueue);
int plen = MYSQL_GET_PACKET_LEN(data);
if (nbytes_read < 3 || nbytes_read < MYSQL_GET_PACKET_LEN(data))
if (nbytes_read < 3 || nbytes_read < MYSQL_GET_PACKET_LEN(data) + 4)
{
rc = 0;
goto return_rc;