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
This commit is contained in:
parent
fa1438cbf4
commit
245bfc52fc
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user