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
commitd3be3cbcfdf74f4131e16b201c7eb5dfde0a8257 (patch)
tree96a377282ba249c3076ed502ea0325733639fff9 /libmysqld
parenta77d4ce2725a0d8e2310b3d7e1c3aed7908ea143 (diff)
downloadmariadb-git-d3be3cbcfdf74f4131e16b201c7eb5dfde0a8257.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)))