summaryrefslogtreecommitdiff
path: root/libmysqld/libmysqld.c
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2003-09-11 20:24:14 +0300
committermonty@mashka.mysql.fi <>2003-09-11 20:24:14 +0300
commit73f66f68fd9588d89a0dac8457bab8e713ae7a49 (patch)
tree20f0ccc7be8e0d205ea5a00d6ec5f57a14d85d3f /libmysqld/libmysqld.c
parent45aa92c574e032bcf85b7207732158433e64afd5 (diff)
parent62103fff405545e022c61721c62eec0e5d7d264d (diff)
downloadmariadb-git-73f66f68fd9588d89a0dac8457bab8e713ae7a49.tar.gz
merge with 4.0.15
Diffstat (limited to 'libmysqld/libmysqld.c')
-rw-r--r--libmysqld/libmysqld.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c
index 48b3397ee7c..05e5ff59b55 100644
--- a/libmysqld/libmysqld.c
+++ b/libmysqld/libmysqld.c
@@ -210,11 +210,9 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
db ? db : "(Null)",
user ? user : "(Null)"));
- if (mysql->options.methods_to_use == MYSQL_OPT_USE_REMOTE_CONNECTION)
- cli_mysql_real_connect(mysql, host, user,
- passwd, db, port, unix_socket, client_flag);
- if ((mysql->options.methods_to_use == MYSQL_OPT_GUESS_CONNECTION) &&
- host && strcmp(host,LOCAL_HOST))
+ if (mysql->options.methods_to_use == MYSQL_OPT_USE_REMOTE_CONNECTION ||
+ (mysql->options.methods_to_use == MYSQL_OPT_GUESS_CONNECTION &&
+ host && strcmp(host,LOCAL_HOST)))
cli_mysql_real_connect(mysql, host, user,
passwd, db, port, unix_socket, client_flag);
@@ -277,7 +275,8 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
DBUG_RETURN(mysql);
error:
- DBUG_PRINT("error",("message: %u (%s)",mysql->net.last_errno,mysql->net.last_error));
+ DBUG_PRINT("error",("message: %u (%s)", mysql->net.last_errno,
+ mysql->net.last_error));
{
/* Free alloced memory */
my_bool free_me=mysql->free_me;
@@ -289,6 +288,7 @@ error:
DBUG_RETURN(0);
}
+
/*************************************************************************
** Send a QUIT to the server and close the connection
** If handle is alloced by mysql connect free it.