diff options
author | hf@deer.(none) <> | 2005-01-03 19:21:54 +0400 |
---|---|---|
committer | hf@deer.(none) <> | 2005-01-03 19:21:54 +0400 |
commit | 5eb5fd12be42918f6e93391068d620554c11a08d (patch) | |
tree | 96a377282ba249c3076ed502ea0325733639fff9 /libmysqld/libmysqld.c | |
parent | e8e6d0577fecd115b763ba68ac52b609ec17d6a2 (diff) | |
download | mariadb-git-5eb5fd12be42918f6e93391068d620554c11a08d.tar.gz |
fix for bug #5920 (embedded-server mysql doesn't handle --defaults-file)
Diffstat (limited to 'libmysqld/libmysqld.c')
-rw-r--r-- | libmysqld/libmysqld.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index a2c4be1a078..6fa41fb3fd0 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -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))) |