Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5
-
None
Description
When we pick the strategy of using addon fields while doing filesort, we try to check if one can pack the addon fields or not.
This is done inside the function try_to_pack_addons()
Inside this function, we have
const uint sz= Addon_fields::size_of_length_field; |
if (rec_length + sz > max_length_for_sort_data) |
return; |
This means if the number of bytes becomes greater than max_length_for_sort_data by adding the size of length field for
addons, then we should not pack.
I think we can easily lift this limitation because it would be beneficial to pack even in such cases, so if the addon fields are picked (they already honour the max_length_for_sort_data in the function filesort_uses_addons()) then we should try to pack them in such cases.
This issue was found during the performance testing for packed sort keys MDEV-21580
Attachments
Issue Links
- relates to
-
MDEV-6915 Allow packed keys and packed values of non-sorted fields in the sort buffer
- Closed