From 9b4e8223b4bd22f364a8d3bbc86a9e018bd297d0 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Mon, 2 Nov 2015 15:54:46 +0200 Subject: [PATCH] Removed double check of database name on login. Removed redundant check of the default database when a user with proper credentials is being authenticated. --- server/modules/protocol/mysql_client.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/server/modules/protocol/mysql_client.c b/server/modules/protocol/mysql_client.c index 3d25106b1..db580e69a 100644 --- a/server/modules/protocol/mysql_client.c +++ b/server/modules/protocol/mysql_client.c @@ -590,18 +590,11 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF **buf) { sizeof(protocol->scramble), username, stage1_hash); - } - else - { - LOGIF(LM, (skygw_log_write(LOGFILE_MESSAGE, - "%s: login attempt for user %s, user not " - "found.", - dcb->service->name, username))); - } - } - /* Do again the database check */ - auth_ret = check_db_name_after_auth(dcb, database, auth_ret); + /* Do again the database check */ + auth_ret = check_db_name_after_auth(dcb, database, auth_ret); + } + } /* on succesful auth set user into dcb field */ if (auth_ret == 0) {