mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '11.8' into main
This commit is contained in:
@@ -16646,7 +16646,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min_in_range()
|
||||
Remember this key, and continue looking for a non-NULL key that
|
||||
satisfies some other condition.
|
||||
*/
|
||||
memcpy(tmp_record, record, head->s->rec_buff_length);
|
||||
memcpy(tmp_record, record, head->s->reclength);
|
||||
found_null= TRUE;
|
||||
continue;
|
||||
}
|
||||
@@ -16686,7 +16686,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min_in_range()
|
||||
*/
|
||||
if (found_null && result)
|
||||
{
|
||||
memcpy(record, tmp_record, head->s->rec_buff_length);
|
||||
memcpy(record, tmp_record, head->s->reclength);
|
||||
result= 0;
|
||||
}
|
||||
return result;
|
||||
@@ -16719,7 +16719,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_max_in_range()
|
||||
ha_rkey_function find_flag;
|
||||
key_part_map keypart_map;
|
||||
QUICK_RANGE *cur_range;
|
||||
int result;
|
||||
int result= HA_ERR_KEY_NOT_FOUND;
|
||||
|
||||
DBUG_ASSERT(min_max_ranges.elements > 0);
|
||||
|
||||
@@ -16728,10 +16728,11 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_max_in_range()
|
||||
get_dynamic(&min_max_ranges, (uchar*)&cur_range, range_idx - 1);
|
||||
|
||||
/*
|
||||
If the current value for the min/max argument is smaller than the left
|
||||
boundary of cur_range, there is no need to check this range.
|
||||
If the key has already been "moved" by a successful call to
|
||||
ha_index_read_map, and the current value for the max argument
|
||||
comes before the range, there is no need to check this range.
|
||||
*/
|
||||
if (range_idx != min_max_ranges.elements &&
|
||||
if (!result &&
|
||||
!(cur_range->flag & NO_MIN_RANGE) &&
|
||||
(key_cmp(min_max_arg_part, (const uchar*) cur_range->min_key,
|
||||
min_max_arg_len) == -1))
|
||||
|
Reference in New Issue
Block a user