summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2005-01-03 19:21:54 +0400
committerunknown <hf@deer.(none)>2005-01-03 19:21:54 +0400
commitda04be23fed6739f68237337bf1d16f0a4ed1840 (patch)
tree96a377282ba249c3076ed502ea0325733639fff9 /libmysqld
parent4b62270ffd63b249c54e795882278c140e547e63 (diff)
downloadmariadb-git-da04be23fed6739f68237337bf1d16f0a4ed1840.tar.gz
fix for bug #5920 (embedded-server mysql doesn't handle --defaults-file)
client/mysql.cc: bug #5920 (embedded-server mysql doesn't handle --defaults-file) defaults files handled include/my_sys.h: bug #5920 (embedded-server mysql doesn't handle --defaults-file) get_defaults_file interface added libmysqld/libmysqld.c: just small fix, not related to the bug. mysys/default.c: bug #5920 (embedded-server mysql doesn't handle --defaults-file) get_defaults_files implementation
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/libmysqld.c3
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)))