diff options
author | Alexander Nozdrin <alexander.nozdrin@oracle.com> | 2012-04-27 19:14:28 +0400 |
---|---|---|
committer | Alexander Nozdrin <alexander.nozdrin@oracle.com> | 2012-04-27 19:14:28 +0400 |
commit | 25cdec81e082049a668552f631fa32a838d915e3 (patch) | |
tree | b3ee0b8979d0ccfdea52af32f5bb363efa56ad8d /sql/mysqld.cc | |
parent | 6fa011056abf534bf3d544cdef14f3a539777b6d (diff) | |
download | mariadb-git-25cdec81e082049a668552f631fa32a838d915e3.tar.gz |
Proper 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/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index e90bd8dad33..936167280e0 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -341,7 +341,7 @@ static char *default_character_set_name; static char *character_set_filesystem_name; static char *lc_messages; static char *lc_time_names_name; -static char *my_bind_addr_str; +char *my_bind_addr_str; static char *default_collation_name; char *default_storage_engine; static char compiled_default_collation_name[]= MYSQL_DEFAULT_COLLATION_NAME; @@ -1841,9 +1841,6 @@ 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); @@ -5713,9 +5710,6 @@ struct my_option my_long_options[]= {"autocommit", 0, "Set default value for autocommit (0 or 1)", &opt_autocommit, &opt_autocommit, 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, NULL}, - {"bind-address", OPT_BIND_ADDRESS, "IP address to bind to.", - &my_bind_addr_str, &my_bind_addr_str, 0, GET_STR, - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"binlog-do-db", OPT_BINLOG_DO_DB, "Tells the master it should log updates for the specified database, " "and exclude all others not explicitly mentioned.", |