Commit e9a3612a authored by unknown's avatar unknown

Fix asked by Ranger.

If embedded library gets empty string as a hostname it should use embedded connection


libmysqld/libmysqld.c:
  Check for empty string added
parent 9ff04fe5
...@@ -145,7 +145,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, ...@@ -145,7 +145,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
if (mysql->options.methods_to_use == MYSQL_OPT_USE_REMOTE_CONNECTION || if (mysql->options.methods_to_use == MYSQL_OPT_USE_REMOTE_CONNECTION ||
(mysql->options.methods_to_use == MYSQL_OPT_GUESS_CONNECTION && (mysql->options.methods_to_use == MYSQL_OPT_GUESS_CONNECTION &&
host && strcmp(host,LOCAL_HOST))) host && *host && strcmp(host,LOCAL_HOST)))
DBUG_RETURN(cli_mysql_real_connect(mysql, host, user, DBUG_RETURN(cli_mysql_real_connect(mysql, host, user,
passwd, db, port, passwd, db, port,
unix_socket, client_flag)); unix_socket, client_flag));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment