diff --git a/server/modules/protocol/mysql_backend.c b/server/modules/protocol/mysql_backend.c index ca365066e..2772e8e7b 100644 --- a/server/modules/protocol/mysql_backend.c +++ b/server/modules/protocol/mysql_backend.c @@ -492,6 +492,7 @@ static int gw_read_backend_event(DCB *dcb) { dcb->dcb_readqueue = NULL; } } + /** This may be either short prefix of a packet, or the tail of it. */ else { if (nbytes_read < 5) diff --git a/server/modules/protocol/mysql_client.c b/server/modules/protocol/mysql_client.c index 3c8a70bd9..b0ba57aec 100644 --- a/server/modules/protocol/mysql_client.c +++ b/server/modules/protocol/mysql_client.c @@ -578,8 +578,8 @@ int gw_read_client_event( if (nbytes_read < 3 || nbytes_read < MYSQL_GET_PACKET_LEN(data)+4) { - gwbuf_append(dcb->dcb_readqueue, read_buffer); - rc = 0; + dcb->dcb_readqueue = gwbuf_append(dcb->dcb_readqueue, read_buffer); + rc = 0; goto return_rc; } }