From 58a2bd81070d8be0939370adee067b21a63bb5eb Mon Sep 17 00:00:00 2001 From: lazio579 Date: Wed, 20 Mar 2019 10:41:32 +0800 Subject: [PATCH] Fix more show connectionlist problems --- CMakeLists.txt | 2 +- plugins/admin/admin-commands.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f3c8b0..1300100 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,7 @@ EXECUTE_PROCESS(COMMAND git describe --tags MESSAGE(STATUS "building from ${GIT_REVISION}") SET(CPACK_PACKAGE_VERSION_MAJOR "2") SET(CPACK_PACKAGE_VERSION_MINOR "2") -SET(CPACK_PACKAGE_VERSION_PATCH "0") +SET(CPACK_PACKAGE_VERSION_PATCH "1") SET(CPACK_PACKAGE_VENDOR "MySQL") SET(PACKAGE_NAME cetus) diff --git a/plugins/admin/admin-commands.c b/plugins/admin/admin-commands.c index 3e092ac..7ad803c 100644 --- a/plugins/admin/admin-commands.c +++ b/plugins/admin/admin-commands.c @@ -566,6 +566,7 @@ void admin_show_connectionlist(network_mysqld_con *con, int show_count) } #ifndef SIMPLE_PARSER + if (con->servers) { int j; GString *servers = g_string_new(NULL); for (j = 0; j < con->servers->len; j++) { @@ -582,6 +583,9 @@ void admin_show_connectionlist(network_mysqld_con *con, int show_count) } g_ptr_array_add(row, g_strdup(servers->str)); g_string_free(servers, TRUE); + } else { + g_ptr_array_add(row, NULL); + } #else if (con->server != NULL) {