mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-24 02:01:42 +08:00
Remove duplicate code block I created by merge bits and pieces of branches, thereby confusing bzr.
This commit is contained in:
@@ -8246,22 +8246,6 @@ sub main {
|
||||
. "or a unique index which is required for the DELETE trigger.\n";
|
||||
}
|
||||
|
||||
# Find a pk or unique index to use for the delete trigger. can_nibble()
|
||||
# above returns an index, but NibbleIterator will use non-unique indexes,
|
||||
# so we have to do this again here.
|
||||
my $indexes = $new_tbl->{tbl_struct}->{keys}; # brevity
|
||||
foreach my $index ( $tp->sort_indexes($new_tbl->{tbl_struct}) ) {
|
||||
if ( $index eq 'PRIMARY' || $indexes->{$index}->{is_unique} ) {
|
||||
PTDEBUG && _d('Delete trigger index:', Dumper($index));
|
||||
$new_tbl->{del_index} = $index;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if ( !$new_tbl->{del_index} ) {
|
||||
die "The new table $new_tbl->{name} does not have a PRIMARY KEY "
|
||||
. "or a unique index which is required for the DELETE trigger.\n";
|
||||
}
|
||||
|
||||
# ########################################################################
|
||||
# Step 3: Create the triggers to capture changes on the original table and
|
||||
# apply them to the new table.
|
||||
|
||||
Reference in New Issue
Block a user