Fix more show connectionlist problems

This commit is contained in:
lazio579 2019-03-20 10:41:32 +08:00
parent a803fa6296
commit 58a2bd8107
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -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) {