From fcfcb3cac0dd187d4fe6ab45a515936db5cc227a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Wed, 18 Aug 2021 13:33:44 +0200 Subject: [PATCH] Improve error verbosity in ProxySQL Cluster --- lib/ProxySQL_Cluster.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ProxySQL_Cluster.cpp b/lib/ProxySQL_Cluster.cpp index c32ff5030..7335d6754 100644 --- a/lib/ProxySQL_Cluster.cpp +++ b/lib/ProxySQL_Cluster.cpp @@ -184,7 +184,7 @@ void * ProxySQL_Cluster_Monitor_thread(void *args) { } else { query_error = query3; if (query_error_counter == 0) { - proxy_error("Cluster: unable to run query on %s:%d using user %s : %s\n", node->hostname, node->port , username, query_error); + proxy_error("Cluster: unable to run query on %s:%d using user %s : %s . Error: %s\n", node->hostname, node->port , username, query_error, mysql_error(conn)); } if (++query_error_counter == QUERY_ERROR_RATE) query_error_counter = 0; } @@ -215,7 +215,7 @@ void * ProxySQL_Cluster_Monitor_thread(void *args) { } else { query_error = query2; if (query_error_counter == 0) { - proxy_error("Cluster: unable to run query on %s:%d using user %s : %s\n", node->hostname, node->port , username, query_error); + proxy_error("Cluster: unable to run query on %s:%d using user %s : %s . Error: %s\n", node->hostname, node->port , username, query_error, mysql_error(conn)); } if (++query_error_counter == QUERY_ERROR_RATE) query_error_counter = 0; } @@ -224,7 +224,7 @@ void * ProxySQL_Cluster_Monitor_thread(void *args) { } else { query_error = query1; if (query_error_counter == 0) { - proxy_error("Cluster: unable to run query on %s:%d using user %s : %s\n", node->hostname, node->port , username, query_error); + proxy_error("Cluster: unable to run query on %s:%d using user %s : %s . Error: %s\n", node->hostname, node->port , username, query_error, mysql_error(conn)); } if (++query_error_counter == QUERY_ERROR_RATE) query_error_counter = 0; }