From c1b5d70eea51cdc027480590f04205d0bcd3d23c 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] 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 b18bdafaf..7a241315e 100644 --- a/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.cc +++ b/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.cc @@ -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);