From 6dd4a04c5d3eb27cab4197789cf34feabd7e16c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Fri, 13 Dec 2019 08:34:55 +0200 Subject: [PATCH] cherry-pick: 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. --- server/modules/protocol/MySQL/mariadbbackend/mysql_backend.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.cc b/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.cc index 87fe9b456..7b8f4259a 100644 --- a/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.cc +++ b/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.cc @@ -945,7 +945,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);