mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user