1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

fix for bug #5920 (embedded-server mysql doesn't handle --defaults-file)

This commit is contained in:
hf@deer.(none)
2005-01-03 19:21:54 +04:00
parent e8e6d0577f
commit 5eb5fd12be
4 changed files with 55 additions and 17 deletions

View File

@ -143,6 +143,9 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
db ? db : "(Null)",
user ? user : "(Null)"));
if (!host || !host[0])
host= mysql->options.host;
if (mysql->options.methods_to_use == MYSQL_OPT_USE_REMOTE_CONNECTION ||
(mysql->options.methods_to_use == MYSQL_OPT_GUESS_CONNECTION &&
host && *host && strcmp(host,LOCAL_HOST)))