From 29697db578200cd487d45eab2766cd34c0ba2b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Fri, 18 Jun 2021 18:59:38 +0200 Subject: [PATCH] Added client information to error generated when multi-statement command fails to be parsed #3487 --- lib/MySQL_Session.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/MySQL_Session.cpp b/lib/MySQL_Session.cpp index d8d9594c8..7cc7469e9 100644 --- a/lib/MySQL_Session.cpp +++ b/lib/MySQL_Session.cpp @@ -5443,7 +5443,11 @@ bool MySQL_Session::handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_C #endif if (index(dig,';') && (index(dig,';') != dig + strlen(dig)-1)) { string nqn = string((char *)CurrentQuery.QueryPointer,CurrentQuery.QueryLength); - proxy_warning("Unable to parse multi-statements command with SET statement: setting lock hostgroup . Command: %s\n", nqn.c_str()); + proxy_warning( + "Unable to parse multi-statements command with SET statement from client" + " %s:%d: setting lock hostgroup. Command: %s\n", client_myds->addr.addr, + client_myds->addr.port, nqn.c_str() + ); *lock_hostgroup = true; return false; }