1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge 11.4 into 11.8

This commit is contained in:
Marko Mäkelä
2025-04-02 14:07:01 +03:00
786 changed files with 10229 additions and 5958 deletions

View File

@@ -16638,7 +16638,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;
}
@@ -16678,7 +16678,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;
@@ -16711,7 +16711,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);
@@ -16720,10 +16720,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))