Compare commits

...

1 Commits

Author SHA1 Message Date
Carlos Salguero
7710d0f343 Test to detect if this could be causing a slowdown 2018-04-03 13:46:44 -03:00

View File

@@ -5505,17 +5505,17 @@ sub wait_for_master {
my $result; my $result;
my $waited; my $waited;
if ( $master_status ) { if ( $master_status ) {
my $slave_status; # my $slave_status;
eval { # eval {
$slave_status = $self->get_slave_status($slave_dbh); # $slave_status = $self->get_slave_status($slave_dbh);
}; # };
if ($EVAL_ERROR) { # if ($EVAL_ERROR) {
return { # return {
result => undef, # result => undef,
waited => 0, # waited => 0,
error =>'Wait for master: this is a multi-master slave but "channel" was not specified on the command line', # error =>'Wait for master: this is a multi-master slave but "channel" was not specified on the command line',
}; # };
} # }
my $server_version = VersionParser->new($slave_dbh); my $server_version = VersionParser->new($slave_dbh);
my $channel_sql = $server_version > '5.6' && $self->{channel} ? ", '$self->{channel}'" : ''; my $channel_sql = $server_version > '5.6' && $self->{channel} ? ", '$self->{channel}'" : '';
my $sql = "SELECT MASTER_POS_WAIT('$master_status->{file}', $master_status->{position}, $timeout $channel_sql)"; my $sql = "SELECT MASTER_POS_WAIT('$master_status->{file}', $master_status->{position}, $timeout $channel_sql)";