mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-25 13:46:22 +00:00
Updated modules in all tools
This commit is contained in:
@@ -1253,7 +1253,8 @@ sub get_cxn_params {
|
||||
. join(';', map { "$opts{$_}->{dsn}=$info->{$_}" }
|
||||
grep { defined $info->{$_} }
|
||||
qw(F h P S A))
|
||||
. ';mysql_read_default_group=client';
|
||||
. ';mysql_read_default_group=client'
|
||||
. ($info->{L} ? ';mysql_local_infile=1' : '');
|
||||
}
|
||||
PTDEBUG && _d($dsn);
|
||||
return ($dsn, $info->{u}, $info->{p});
|
||||
@@ -1282,6 +1283,9 @@ sub get_dbh {
|
||||
mysql_enable_utf8 => ($cxn_string =~ m/charset=utf8/i ? 1 : 0),
|
||||
};
|
||||
@{$defaults}{ keys %$opts } = values %$opts;
|
||||
if (delete $defaults->{L}) { # L for LOAD DATA LOCAL INFILE, our own extension
|
||||
$defaults->{mysql_local_infile} = 1;
|
||||
}
|
||||
|
||||
if ( $opts->{mysql_use_result} ) {
|
||||
$defaults->{mysql_use_result} = 1;
|
||||
@@ -1576,7 +1580,9 @@ sub is_cluster_node {
|
||||
PTDEBUG && _d($sql);
|
||||
my $row = $self->{dbh}->selectrow_arrayref($sql);
|
||||
PTDEBUG && _d(defined $row ? @$row : 'undef');
|
||||
$self->{is_cluster_node} = $row && $row->[0] ? 1 : 0;
|
||||
$self->{is_cluster_node} = $row && $row->[1]
|
||||
? ($row->[1] eq 'ON' || $row->[1] eq '1')
|
||||
: 0;
|
||||
|
||||
return $self->{is_cluster_node};
|
||||
}
|
||||
|
Reference in New Issue
Block a user