diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-08-25 12:40:09 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-08-25 12:40:09 +0200 |
commit | 6b1863b8304662189a3b9a4aef1e1bebef035b86 (patch) | |
tree | 48ba2cbdda863b644108e93ace3668333ae0d193 /sql/opt_range.cc | |
parent | ea91bb6801b1b619d64fa137ea351eca9de683ec (diff) | |
parent | 5bbe929d706e26cb3f9b291da6009526a17b1545 (diff) | |
download | mariadb-git-6b1863b8304662189a3b9a4aef1e1bebef035b86.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r-- | sql/opt_range.cc | 5 |
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, |