Comment 1 for bug 1482783

Revision history for this message
Nilnandan Joshi (nilnandan-joshi) wrote :

Hi Frank,

As per the code, it seems, that it calls die. Should we need to verify with specific test case?

else { # chunking the table
           if ( $o->get('check-plan') ) {
              my $idx_len = new IndexLength(Quoter => $q);
              my ($key_len, $key) = $idx_len->index_length(
                 Cxn => $args{Cxn},
                 tbl => $tbl,
                 index => $nibble_iter->nibble_index(),
                 n_index_cols => $o->get('chunk-index-columns'),
              );
              if ( !$key || lc($key) ne lc($nibble_iter->nibble_index()) ) {
                 die ts("Cannot determine the key_len of the chunk index "
                    . "because MySQL chose "
                    . ($key ? "the $key" : "no") . " index "
                    . "instead of the " . $nibble_iter->nibble_index()
                    . " index for the first lower boundary statement. "
                    . "See --[no]check-plan in the documentation for more "
                    . "information.");
              }
              elsif ( !$key_len ) {
                 die ts("The key_len of the $key index is "
                    . (defined $key_len ? "zero" : "NULL")
                    . ", but this should not be possible. "
                    . "See --[no]check-plan in the documentation for more "
                    . "information.");
              }
              $tbl->{key_len} = $key_len;
           }
        }