Comment 4 for bug 1452902

Revision history for this message
Regev Brody (regevbr) wrote :

Looking at line 3221:

   my $index = $tp->find_best_index($tbl, $args{index});
   die "Cannot find an ascendable index in table" unless $index;

   if ( $index && $tbl->{keys}->{$index}->{is_unique}) {
      @del_cols = @{$tbl->{keys}->{$index}->{cols}};
   }
   else {
      @del_cols = @{$tbl->{cols}};
   }
   PTDEBUG && _d('Columns needed for DELETE:', join(', ', @del_cols));

I think the solution will be that if the index is no unique, use the primary key if exists as the deletion columns