Merge lp:~percona-toolkit-dev/percona-toolkit/pt-osc-requests-password-twice-1286250 into lp:~percona-toolkit-dev/percona-toolkit/release-2.2.8

Proposed by Frank Cizmich
Status: Merged
Approved by: Daniel Nichter
Approved revision: 599
Merged at revision: 602
Proposed branch: lp:~percona-toolkit-dev/percona-toolkit/pt-osc-requests-password-twice-1286250
Merge into: lp:~percona-toolkit-dev/percona-toolkit/release-2.2.8
Diff against target: 12 lines (+1/-1)
1 file modified
bin/pt-online-schema-change (+1/-1)
To merge this branch: bzr merge lp:~percona-toolkit-dev/percona-toolkit/pt-osc-requests-password-twice-1286250
Reviewer Review Type Date Requested Status
Daniel Nichter Approve
Review via email: mp+221291@code.launchpad.net

Description of the change

Modified Cxn in pt-osc to inherit password from other dsn, without asking for it again.
Works for empty passwords too.

To post a comment you must log in.
Revision history for this message
Daniel Nichter (daniel-nichter) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/pt-online-schema-change'
--- bin/pt-online-schema-change 2014-04-24 17:38:02 +0000
+++ bin/pt-online-schema-change 2014-05-28 20:18:09 +0000
@@ -3771,7 +3771,7 @@
37713771
3772 my $dbh = $self->{dbh};3772 my $dbh = $self->{dbh};
3773 if ( !$dbh || !$dbh->ping() ) {3773 if ( !$dbh || !$dbh->ping() ) {
3774 if ( $self->{ask_pass} && !$self->{asked_for_pass} ) {3774 if ( $self->{ask_pass} && !$self->{asked_for_pass} && !defined $dsn->{p}) {
3775 $dsn->{p} = OptionParser::prompt_noecho("Enter MySQL password: ");3775 $dsn->{p} = OptionParser::prompt_noecho("Enter MySQL password: ");
3776 $self->{asked_for_pass} = 1;3776 $self->{asked_for_pass} = 1;
3777 }3777 }

Subscribers

People subscribed via source and target branches

to all changes: