Commit 245bfc52 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-8669 MTR client connections on Windows became much slower.

The regression is caused by change bind-address server parameter
in MDEV-8083, so now server listens on IPv4 only by default.

The problem however is that on Windows, connection to server on localhost
appears to be much faster, if server listens on IPv6/dual stack.
mysql_real_connect() would try to connect to IPv6 loopback  first,
and if this fails, the failing connect() call takes several seconds.

To fix, use bind-address=* on Windows, and 127.0.0.1 elsewhere
parent fa1438cb
......@@ -31,7 +31,6 @@ debug-no-sync
# Retry bind as this may fail on busy server
port-open-timeout=10
bind-address=127.0.0.1
log-bin-trust-function-creators=1
key_buffer_size= 1M
......
......@@ -169,6 +169,13 @@ sub fix_log {
return "$dir/mysqld.log";
}
sub fix_bind_address {
if (IS_WINDOWS) {
return "*";
} else {
return "127.0.0.1";
}
}
sub fix_log_slow_queries {
my ($self, $config, $group_name, $group)= @_;
my $dir= dirname($group->value('datadir'));
......@@ -251,6 +258,7 @@ my @mysqld_rules=
{ 'ssl-ca' => \&fix_ssl_ca },
{ 'ssl-cert' => \&fix_ssl_server_cert },
{ 'ssl-key' => \&fix_ssl_server_key },
{ 'bind-address' => \&fix_bind_address },
);
if (IS_WINDOWS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment