mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-12 22:19:44 +00:00
used ReadKeyMini. Moved double password logic to Cxn. Removed {ask_pass} from Cxn
This commit is contained in:
@@ -2295,7 +2295,7 @@ sub new {
|
||||
set => $args{set},
|
||||
NAME_lc => defined($args{NAME_lc}) ? $args{NAME_lc} : 1,
|
||||
dbh_set => 0,
|
||||
ask_pass => $o->get('ask-pass') || $args{ask_pass},
|
||||
ask_pass => $o->get('ask-pass'),
|
||||
DSNParser => $dp,
|
||||
is_cluster_node => undef,
|
||||
parent => $args{parent},
|
||||
@@ -2311,7 +2311,7 @@ sub connect {
|
||||
|
||||
my $dbh = $self->{dbh};
|
||||
if ( !$dbh || !$dbh->ping() ) {
|
||||
if ( $self->{ask_pass} && !$self->{asked_for_pass} ) {
|
||||
if ( $self->{ask_pass} && !$self->{asked_for_pass} && !defined $dsn->{p} ) {
|
||||
$dsn->{p} = OptionParser::prompt_noecho("Enter MySQL password: ");
|
||||
$self->{asked_for_pass} = 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user