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.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 0d92d434762..1a0d12a8dee 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -2426,8 +2426,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
scan_time= read_time= DBL_MAX;
if (limit < records)
read_time= (double) records + scan_time + 1; // Force to use index
- else if (read_time <= 2.0 && !force_quick_range)
- DBUG_RETURN(0); /* No need for quick select */
possible_keys.clear_all();
@@ -2697,7 +2695,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
thd->no_errors=0;
}
-
DBUG_EXECUTE("info", print_quick(quick, &needed_reg););
/*
@@ -10376,8 +10373,10 @@ get_quick_keys(PARAM *param,QUICK_RANGE_SELECT *quick,KEY_PART *key,
KEY *table_key=quick->head->key_info+quick->index;
flag=EQ_RANGE;
if ((table_key->flags & HA_NOSAME) &&
+ min_part == key_tree->part &&
key_tree->part == table_key->user_defined_key_parts-1)
{
+ DBUG_ASSERT(min_part == max_part);
if ((table_key->flags & HA_NULL_PART_KEY) &&
null_part_in_key(key,
param->min_key,