Merge lp:~percona-toolkit-dev/percona-toolkit/pt-online-schema-change--doesnt-honor--ask-pass-1396868 into lp:~percona-toolkit-dev/percona-toolkit/release-2.2.13
Proposed by
Frank Cizmich
Status: | Merged |
---|---|
Approved by: | Daniel Nichter |
Approved revision: | 614 |
Merged at revision: | 615 |
Proposed branch: | lp:~percona-toolkit-dev/percona-toolkit/pt-online-schema-change--doesnt-honor--ask-pass-1396868 |
Merge into: | lp:~percona-toolkit-dev/percona-toolkit/release-2.2.13 |
Diff against target: |
359 lines (+179/-16) 8 files modified
bin/pt-config-diff (+2/-2) bin/pt-deadlock-logger (+2/-2) bin/pt-fk-error-logger (+2/-2) bin/pt-kill (+2/-2) bin/pt-online-schema-change (+165/-2) bin/pt-table-checksum (+2/-2) bin/pt-upgrade (+2/-2) lib/Cxn.pm (+2/-2) |
To merge this branch: | bzr merge lp:~percona-toolkit-dev/percona-toolkit/pt-online-schema-change--doesnt-honor--ask-pass-1396868 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Nichter | Needs Fixing | ||
Review via email: mp+245162@code.launchpad.net |
Description of the change
Cxn for some strange reason did not honor --ask-pass, (since at least 2.2.9) while fat-packed version in tools did.
Fixed Cxn and synced with rest of tools.
Also fixed pt-online-schema problem when pressing ctl+c while being prompted for password.
Terminal would end up in an inconsistent state.
Used Term::ReadKey to restore previous state.
Also made simpler solution to pt-online-
To post a comment you must log in.
- Removed the args{ask_pass} since it's not used. It's the way the module was coded before, which is strange since it doesn't work. So I left it in as a fallback initially just in case it served a purpose. But since it's not used, let's simplify.
- Including ReadKeyMini solved the ctl+c problem by itself. Nice :-)
Called ReadMode explicitly anyway just to ensure it's known to be used within the code.
- Passed double ask-pass handling logic into Cxn, which was how I did it before for pt-osc.