merged pt-online-schema-change--doesnt-honor--ask-pass-1396868

This commit is contained in:
Frank Cizmich
2015-01-20 13:53:13 -02:00
8 changed files with 179 additions and 16 deletions

View File

@@ -5158,7 +5158,7 @@ sub new {
set => $args{set},
NAME_lc => defined($args{NAME_lc}) ? $args{NAME_lc} : 1,
dbh_set => 0,
ask_pass => $args{ask_pass},
ask_pass => $o->get('ask-pass'),
DSNParser => $dp,
is_cluster_node => undef,
parent => $args{parent},
@@ -5174,7 +5174,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;
}