mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-08 20:17:43 +00:00
PT-132 pt-online-schema-change should imply --no-drop-new-table when --no-swap-tables and --no-drop-triggers used
This commit is contained in:
@@ -68,6 +68,27 @@ is_deeply(
|
||||
"no swap-tables, drop-triggers, drop-new-table: tables"
|
||||
) or diag(Dumper($tables), $output);
|
||||
|
||||
# #############################################################################
|
||||
# --no-swap-tables --no-drop-triggers implies --no-drop-new-table
|
||||
# #############################################################################
|
||||
$sb->load_file('master', "$sample/basic_no_fks_innodb.sql");
|
||||
|
||||
$output = output(
|
||||
sub { pt_online_schema_change::main(
|
||||
"$master_dsn,D=pt_osc,t=t",
|
||||
'--alter', 'ADD COLUMN d INT',
|
||||
qw(--execute --no-swap-tables --no-drop-triggers))
|
||||
},
|
||||
stderr => 1,
|
||||
);
|
||||
|
||||
$tables = $dbh1->selectall_arrayref("SHOW TABLES FROM pt_osc");
|
||||
is_deeply(
|
||||
$tables,
|
||||
[ ['_t_new'], ['t'] ],
|
||||
"no swap-tables, --no-drop-triggers implies --no-drop-new-table"
|
||||
) or diag(Dumper($tables), $output);
|
||||
|
||||
# #############################################################################
|
||||
# Done.
|
||||
# #############################################################################
|
||||
|
Reference in New Issue
Block a user