From 087272c3e48db1a219239334ec89a5054d39afd1 Mon Sep 17 00:00:00 2001 From: dapeng huang <7xerocha@gmail.com> Date: Tue, 11 Sep 2018 13:39:12 +0800 Subject: [PATCH] fix multistatment hang (#180) --- server/modules/protocol/MySQL/mariadbbackend/mysql_backend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.c b/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.c index 65b0f8371..983175c0e 100644 --- a/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.c +++ b/server/modules/protocol/MySQL/mariadbbackend/mysql_backend.c @@ -823,7 +823,8 @@ gw_read_and_write(DCB *dcb) if (mxs_mysql_is_result_set(read_buffer)) { bool more = false; - if (modutil_count_signal_packets(read_buffer, 0, &more, NULL) != 2) + int eof_cnt = modutil_count_signal_packets(read_buffer, 0, &more, NULL); + if (more || eof_cnt % 2 != 0) { dcb_readq_prepend(dcb, read_buffer); return 0;