From c041797c56c0cfc45e4e067d9f88b457dabcf9a5 Mon Sep 17 00:00:00 2001 From: lazio579 Date: Fri, 19 Apr 2019 09:56:47 +0800 Subject: [PATCH] Reset server_to_be_closed false when reading query --- CMakeLists.txt | 4 ++-- plugins/proxy/proxy-plugin.c | 1 + src/network-mysqld.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e3dfa5f..8bb26be2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,8 +65,8 @@ EXECUTE_PROCESS(COMMAND git describe --tags ) MESSAGE(STATUS "building from ${GIT_REVISION}") SET(CPACK_PACKAGE_VERSION_MAJOR "1") -SET(CPACK_PACKAGE_VERSION_MINOR "1") -SET(CPACK_PACKAGE_VERSION_PATCH "1") +SET(CPACK_PACKAGE_VERSION_MINOR "3") +SET(CPACK_PACKAGE_VERSION_PATCH "0") SET(CPACK_PACKAGE_VENDOR "MySQL") SET(PACKAGE_NAME cetus) diff --git a/plugins/proxy/proxy-plugin.c b/plugins/proxy/proxy-plugin.c index 45fc49da..90457cf1 100644 --- a/plugins/proxy/proxy-plugin.c +++ b/plugins/proxy/proxy-plugin.c @@ -1472,6 +1472,7 @@ NETWORK_MYSQLD_PLUGIN_PROTO(proxy_read_query) int server_attr_changed = 0; con->is_client_to_be_closed = 0; + con->server_to_be_closed = 0; con->server_in_tran_and_auto_commit_received = 0; if (con->server != NULL) { diff --git a/src/network-mysqld.c b/src/network-mysqld.c index 738ddbde..575a0184 100644 --- a/src/network-mysqld.c +++ b/src/network-mysqld.c @@ -3626,7 +3626,7 @@ normal_read_query_result(network_mysqld_con *con, network_mysqld_con_state_t ost while ((packet = g_queue_pop_head(con->server->recv_queue->chunks)) != NULL) { network_mysqld_queue_append_raw(con->client, con->client->send_queue, packet); } - if (con->client->send_queue->len > 0) { + if (!g_queue_is_empty(con->client->send_queue->chunks)) { g_debug("%s: send_part_content_to_client", G_STRLOC); send_part_content_to_client(con); }