diff options
author | svoj@june.mysql.com <> | 2008-03-21 12:43:14 +0400 |
---|---|---|
committer | svoj@june.mysql.com <> | 2008-03-21 12:43:14 +0400 |
commit | 96f82fd12d4285b4f4933535c8a991b6bbeee72d (patch) | |
tree | cd90a4b0bd41e274ac7f896ccd08d5c199d9d9f0 /storage/federated | |
parent | 65992efca64a7945cf08dbfacd5f6ebe2920c5ce (diff) | |
parent | 2b552aae5024d4ac97b9bee50b4625edc5943897 (diff) | |
download | mariadb-git-96f82fd12d4285b4f4933535c8a991b6bbeee72d.tar.gz |
Merge mysql.com:/home/svoj/devel/mysql/push/mysql-5.0-engines
into mysql.com:/home/svoj/devel/mysql/push/mysql-5.1-engines
Diffstat (limited to 'storage/federated')
-rw-r--r-- | storage/federated/ha_federated.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index d7040c44fe8..30702ac4344 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -833,13 +833,20 @@ Then password is a null string, so set to NULL if ((strchr(share->table_name, '/'))) goto error; + /* + If hostname is omitted, we set it to NULL. According to + mysql_real_connect() manual: + The value of host may be either a hostname or an IP address. + If host is NULL or the string "localhost", a connection to the + local host is assumed. + */ if (share->hostname[0] == '\0') share->hostname= NULL; } if (!share->port) { - if (strcmp(share->hostname, my_localhost) == 0) + if (!share->hostname || strcmp(share->hostname, my_localhost) == 0) share->socket= (char *) MYSQL_UNIX_ADDR; else share->port= MYSQL_PORT; |