From 240e7481f054a9bc7c790d3d01e798f4f0a241e2 Mon Sep 17 00:00:00 2001 From: Daniel Nichter Date: Fri, 9 Nov 2012 08:45:23 -0700 Subject: [PATCH] Remove duplicate code block I created by merge bits and pieces of branches, thereby confusing bzr. --- bin/pt-online-schema-change | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/bin/pt-online-schema-change b/bin/pt-online-schema-change index af559b89..e9463bc7 100755 --- a/bin/pt-online-schema-change +++ b/bin/pt-online-schema-change @@ -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.