Fix test PT-1966 (#493)

* Detect raising error for PT-1966

* Fix non-duplicated column name for PT-1966

* More good way to catch an error. (PT-1966)

- https://github.com/percona/percona-toolkit/pull/493#pullrequestreview-678426876

* Add Changelog (PT-1966)

- https://github.com/percona/percona-toolkit/pull/493
This commit is contained in:
yoku0825
2021-06-17 22:28:54 +09:00
committed by GitHub
parent 49b570ed0c
commit dcf237ef8c
2 changed files with 5 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ Changelog for Percona Toolkit
* Fixed bug PT-1919: pt-online-schema change drop_swap can lose triggers. (Thanks Bob) * Fixed bug PT-1919: pt-online-schema change drop_swap can lose triggers. (Thanks Bob)
* Fixed bug PT-1943: BEFORE triggers are dropped after pt-online-schema-change run * Fixed bug PT-1943: BEFORE triggers are dropped after pt-online-schema-change run
* Fixed bug PT-1965: pt-stalk --mysql-only doesn't collect mysqladmin outputs (Thanks Sergey Kuzmichev) * Fixed bug PT-1965: pt-stalk --mysql-only doesn't collect mysqladmin outputs (Thanks Sergey Kuzmichev)
* Fixed bug PT-1966: Fixed test (Thanks @yoku0825)
v3.3.0 release 2021-01-14 v3.3.0 release 2021-01-14

View File

@@ -73,14 +73,14 @@ is_deeply(
# ############################################################################# # #############################################################################
$sb->load_file('master', "$sample/basic_no_fks_innodb.sql"); $sb->load_file('master', "$sample/basic_no_fks_innodb.sql");
$output = output( ($output, $exit) = full_output(
sub { pt_online_schema_change::main( sub { pt_online_schema_change::main(
"$master_dsn,D=pt_osc,t=t", "$master_dsn,D=pt_osc,t=t",
'--alter', 'ADD COLUMN d INT', '--alter', 'ADD COLUMN t INT',
qw(--execute --no-swap-tables --no-drop-triggers)) qw(--execute --no-swap-tables --no-drop-triggers))
}, }
stderr => 1,
); );
unlike($output, qr/DBD::mysql::db do failed:/, "Not failed (PT-1966)");
$tables = $dbh1->selectall_arrayref("SHOW TABLES FROM pt_osc"); $tables = $dbh1->selectall_arrayref("SHOW TABLES FROM pt_osc");
is_deeply( is_deeply(