mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-16 01:00:38 +08:00
Fall back to using pk/ui from orig table if new table del index uses cols that no longer exist in orig table.
This commit is contained in:
@@ -233,6 +233,34 @@ $sb->load_file('master', "$sample/del-trg-bug-1062324.sql");
|
||||
undef,
|
||||
"Delete trigger works after altering PK (bug 1062324)"
|
||||
);
|
||||
|
||||
# Another instance of this bug:
|
||||
# https://bugs.launchpad.net/percona-toolkit/+bug/1103672
|
||||
$sb->load_file('master', "$sample/del-trg-bug-1103672.sql");
|
||||
|
||||
($output, $exit_status) = full_output(
|
||||
sub { pt_online_schema_change::main(@args,
|
||||
"$master_dsn,D=test,t=t1",
|
||||
"--alter", "drop primary key, add column _id int unsigned not null primary key auto_increment FIRST",
|
||||
qw(--execute --no-drop-new-table --no-swap-tables)) },
|
||||
);
|
||||
|
||||
eval {
|
||||
$master_dbh->do("DELETE FROM test.t1 WHERE id=1");
|
||||
};
|
||||
is(
|
||||
$EVAL_ERROR,
|
||||
"",
|
||||
"No delete trigger error after altering PK (bug 1103672)"
|
||||
) or diag($output);
|
||||
|
||||
$row = $master_dbh->selectrow_arrayref("SELECT * FROM test._t1_new WHERE id=1");
|
||||
is(
|
||||
$row,
|
||||
undef,
|
||||
"Delete trigger works after altering PK (bug 1103672)"
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
# #############################################################################
|
||||
|
||||
Reference in New Issue
Block a user