From dc3185c7597d0dd4a34aae2ade2b78404adbdf94 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 24 Mar 2020 22:22:57 +0100 Subject: [PATCH] cleanup: pk_is_clustering_key() -> is_clustering_key() where PK is neither required nor implied --- sql/handler.cc | 2 +- sql/multi_range_read.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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