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 on 2014-05-28
Status: Merged
Approved by: Daniel Nichter on 2014-05-30
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 2014-05-28 Approve on 2014-05-30
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.
review: Approve

Preview Diff

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

Subscribers

People subscribed via source and target branches

to all changes: