1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00
This commit is contained in:
Sergei Golubchik
2014-02-04 10:49:44 +01:00
509 changed files with 34840 additions and 7158 deletions

View File

@ -10796,15 +10796,16 @@ 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) && key->part == table_key->user_defined_key_parts-1)
if ((table_key->flags & HA_NOSAME) &&
key_tree->part == table_key->user_defined_key_parts-1)
{
if (!(table_key->flags & HA_NULL_PART_KEY) ||
!null_part_in_key(key,
param->min_key,
(uint) (tmp_min_key - param->min_key)))
flag|= UNIQUE_RANGE;
else
flag|= NULL_RANGE;
if ((table_key->flags & HA_NULL_PART_KEY) &&
null_part_in_key(key,
param->min_key,
(uint) (tmp_min_key - param->min_key)))
flag|= NULL_RANGE;
else
flag|= UNIQUE_RANGE;
}
}
}
@ -10834,7 +10835,7 @@ get_quick_keys(PARAM *param,QUICK_RANGE_SELECT *quick,KEY_PART *key,
}
/*
Return 1 if there is only one range and this uses the whole primary key
Return 1 if there is only one range and this uses the whole unique key
*/
bool QUICK_RANGE_SELECT::unique_key_range()