3907,3921d3906 < my $best_index; < my @possible_indexes; < if ( !$want_index ) { < PTDEBUG && _d('Auto-selecting best index'); < foreach my $index ( $tp->sort_indexes($tbl_struct) ) { < if ( $index eq 'PRIMARY' || $indexes->{$index}->{is_unique} ) { < $want_index = $index; < last; < } < else { < push @possible_indexes, $index; < } < } < } < 3926a3912,3913 > my $best_index; > my @possible_indexes; 3936a3924,3935 > else { > PTDEBUG && _d('Auto-selecting best index'); > foreach my $index ( $tp->sort_indexes($tbl_struct) ) { > if ( $index eq 'PRIMARY' || $indexes->{$index}->{is_unique} ) { > $best_index = $index; > last; > } > else { > push @possible_indexes, $index; > } > } > }