diff --git a/sql/handler.cc b/sql/handler.cc index 04170d0f347..b1b7a60a413 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2813,7 +2813,7 @@ double handler::keyread_time(uint index, uint ranges, ha_rows rows) { DBUG_ASSERT(ranges == 0 || ranges == 1); size_t len= table->key_info[index].key_length + ref_length; - if (table->file->pk_is_clustering_key(index)) + if (table->file->is_clustering_key(index)) len= table->s->stored_rec_length; double cost= (double)rows*len/(stats.block_size+1)*IDX_BLOCK_COPY_COST; if (ranges) diff --git a/sql/multi_range_read.cc b/sql/multi_range_read.cc index a2d15ff424f..3a708895d78 100644 --- a/sql/multi_range_read.cc +++ b/sql/multi_range_read.cc @@ -385,7 +385,7 @@ ha_rows handler::multi_range_read_info(uint keyno, uint n_ranges, uint n_rows, cost->reset(); /* Produce the same cost as non-MRR code does */ - if (!pk_is_clustering_key(keyno)) + if (!is_clustering_key(keyno)) { /* idx_io_count could potentially be increased with the number of