summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorAlexander Nozdrin <alexander.nozdrin@oracle.com>2012-04-27 18:42:27 +0400
committerAlexander Nozdrin <alexander.nozdrin@oracle.com>2012-04-27 18:42:27 +0400
commit6fa011056abf534bf3d544cdef14f3a539777b6d (patch)
treea294f073fc3ac62aad63131d94a4d87cf03a5705 /sql
parent96b62513f693e2f34ca6931002b30e5694975883 (diff)
downloadmariadb-git-6fa011056abf534bf3d544cdef14f3a539777b6d.tar.gz
Follow-up for Bug#12762885 - 61713: MYSQL WILL NOT BIND TO "LOCALHOST"
IF LOCALHOST IS BOTH IPV4/IPV6 ENABLED. The original patch removed default value of the bind-address option. So, the default value became NULL. By coincedence NULL resolves to 0.0.0.0 and ::, and since the server chooses first IPv4-address, 0.0.0.0 is choosen. So, there was no change in the behaviour. This patch restores default value of the bind-address option to "0.0.0.0".
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 547378d4661..e90bd8dad33 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1841,6 +1841,9 @@ static void network_init(void)
struct addrinfo *ai, *a;
struct addrinfo hints;
+ if (!my_bind_addr_str)
+ my_bind_addr_str= (char *) "0.0.0.0";
+
sql_print_information("Server hostname (bind-address): '%s'; port: %d",
my_bind_addr_str, mysqld_port);