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
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