MXS-2803: Write all buffered data

Since the queued queries will never be inspected after the COM_CHANGE_USER
completes, they should all be written instead of only the first packet.
This commit is contained in:
Markus Mäkelä 2019-12-13 08:34:55 +02:00
parent e909632e9e
commit c1b5d70eea
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -928,7 +928,7 @@ static int gw_read_and_write(DCB* dcb)
if (proto->ignore_replies > 0)
{
/** The reply to a COM_CHANGE_USER is in packet */
GWBUF* query = modutil_get_next_MySQL_packet(&proto->stored_query);
GWBUF* query = proto->stored_query;
proto->stored_query = NULL;
proto->ignore_replies--;
mxb_assert(proto->ignore_replies >= 0);