MXS-2311: Write queued packet one at a time

If an ignorable packet was followed by more than one queued packets, they
would all get routed in the same batch. This would cause unexpected
replies from the server if multiple ignorable packets were queued up.
This commit is contained in:
Markus Mäkelä 2019-02-08 14:15:34 +02:00
parent 1be845c438
commit 46484b4e11
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

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