Skip to content

Commit

Permalink
Add more verbosity when mysql_real_connect() fails
Browse files Browse the repository at this point in the history
Error log will now shows also the hostgroup id of the server the
connection failed to
  • Loading branch information
renecannao committed Aug 23, 2021
1 parent 82532c3 commit 57f6af7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mysql_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ MDB_ASYNC_ST MySQL_Connection::handler(short event) {
}
if (!ret_mysql) {
// always increase the counter
proxy_error("Failed to mysql_real_connect() on %s:%d , FD (Conn:%d , MyDS:%d) , %d: %s.\n", parent->address, parent->port, mysql->net.fd , myds->fd, mysql_errno(mysql), mysql_error(mysql));
proxy_error("Failed to mysql_real_connect() on %u:%s:%d , FD (Conn:%d , MyDS:%d) , %d: %s.\n", parent->myhgc->hid, parent->address, parent->port, mysql->net.fd , myds->fd, mysql_errno(mysql), mysql_error(mysql));
NEXT_IMMEDIATE(ASYNC_CONNECT_FAILED);
} else {
NEXT_IMMEDIATE(ASYNC_CONNECT_SUCCESSFUL);
Expand Down

0 comments on commit 57f6af7

Please sign in to comment.