Remove duplicate code block I created by merge bits and pieces of branches, thereby confusing bzr.

This commit is contained in:
Daniel Nichter
2012-11-09 08:45:23 -07:00
parent 66c4c8b98b
commit 240e7481f0

View File

@@ -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.