From d9a0e26febeeaff2a880684be796c75ab366767f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Wed, 5 Aug 2020 01:40:56 +0200 Subject: [PATCH] Added extra logging reporting 'ConnUsed' and 'ConnFree' for each server --- test/tap/tests/test_connection_annotation-t.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/tap/tests/test_connection_annotation-t.cpp b/test/tap/tests/test_connection_annotation-t.cpp index 00e79c1ca..7c8e6a78b 100644 --- a/test/tap/tests/test_connection_annotation-t.cpp +++ b/test/tap/tests/test_connection_annotation-t.cpp @@ -76,14 +76,17 @@ int main(int argc, char** argv) { mysql_free_result(proxy_res); } - MYSQL_QUERY(proxysql_admin, "SELECT ConnUsed, ConnFree FROM stats.stats_mysql_connection_pool WHERE hostgroup=1"); + MYSQL_QUERY(proxysql_admin, "SELECT ConnUsed, ConnFree, srv_port FROM stats.stats_mysql_connection_pool WHERE hostgroup=1"); proxy_res = mysql_store_result(proxysql_admin); std::vector new_cur_connections {}; while ((row = mysql_fetch_row(proxy_res))) { int row_used_conn = atoi(row[0]); int row_free_conn = atoi(row[1]); + int srv_port = atoi(row[2]); new_cur_connections.push_back(row_used_conn + row_free_conn); + + diag("srv_port: %d - ConnUsed: %d, ConnFree: %d", srv_port, row_used_conn, row_free_conn); } mysql_free_result(proxy_res);