1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

automerge

This commit is contained in:
Georgi Kodinov
2009-06-12 16:58:48 +03:00
3 changed files with 90 additions and 4 deletions

View File

@ -10886,8 +10886,14 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min_in_range()
/* Compare the found key with max_key. */
int cmp_res= key_cmp(index_info->key_part, max_key,
real_prefix_len + min_max_arg_len);
if (!(((cur_range->flag & NEAR_MAX) && (cmp_res == -1)) ||
(cmp_res <= 0)))
/*
The key is outside of the range if:
the interval is open and the key is equal to the maximum boundry
or
the key is greater than the maximum
*/
if (((cur_range->flag & NEAR_MAX) && cmp_res == 0) ||
cmp_res > 0)
{
result= HA_ERR_KEY_NOT_FOUND;
continue;
@ -11004,8 +11010,14 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_max_in_range()
/* Compare the found key with min_key. */
int cmp_res= key_cmp(index_info->key_part, min_key,
real_prefix_len + min_max_arg_len);
if (!(((cur_range->flag & NEAR_MIN) && (cmp_res == 1)) ||
(cmp_res >= 0)))
/*
The key is outside of the range if:
the interval is open and the key is equal to the minimum boundry
or
the key is less than the minimum
*/
if (((cur_range->flag & NEAR_MIN) && cmp_res == 0) ||
cmp_res < 0)
continue;
}
/* If we got to this point, the current key qualifies as MAX. */