summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index a40ad17bc59..969777d4792 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -8376,14 +8376,14 @@ void cost_group_min_max(TABLE* table, KEY *index_info, uint used_key_parts,
keys_per_block= (table->file->block_size / 2 /
(index_info->key_length + table->file->ref_length)
+ 1);
- num_blocks= (table_records / keys_per_block) + 1;
+ num_blocks= (uint)(table_records / keys_per_block) + 1;
/* Compute the number of keys in a group. */
keys_per_group= index_info->rec_per_key[group_key_parts - 1];
if (keys_per_group == 0) /* If there is no statistics try to guess */
/* each group contains 10% of all records */
- keys_per_group= (table_records / 10) + 1;
- num_groups= (table_records / keys_per_group) + 1;
+ keys_per_group= (uint)(table_records / 10) + 1;
+ num_groups= (uint)(table_records / keys_per_group) + 1;
/* Apply the selectivity of the quick select for group prefixes. */
if (range_tree && (quick_prefix_records != HA_POS_ERROR))