MDEV-15656 Assertion `is_last_prefix <= 0' failed in QUICK_GROUP_MIN_MAX_SELECT::get_next
When QUICK_GROUP_MIN_MAX_SELECT is initialized or being reset it stores the prefix of the last group of the index chosen for retrieving data (last_value). Later, when looping through records at get_next() method, the server checks whether the retrieved group is the last, and if so, it finishes processing. At the same time, it looks like there is no need for that additional check since method next_prefix() returns HA_ERR_KEY_NOT_FOUND or HA_ERR_END_OF_FILE when there are no more satisfying records. If we do not perform the check, we do not need to retrieve and store last_value either. This commit removes using of last_value from QUICK_GROUP_MIN_MAX_SELECT. Reviewer: Sergei Petrunia <sergey@mariadb.com>
Showing
Please register or sign in to comment