MDEV-4742 - address review comments.
- Remove second optional parameter to natural_sort_key(), and all fraction handling. - Rename natsort_num2str() to natsort_encode_length() to show the intention that it encodes string *lengths*, and not encode whitespaces and what not. Handles lengths for which log10(len) >= 10, even if they do not happen for MariaDB Strings (where length is limited by 32bit, and log10(len) is <= 9) - Do not let natural sort key grow past max_packet_length. - Split Item_func_natural_sort_key::val_str() further and add natsort_encode_numeric_string(), which contains comment on how whitespaces are handled. - Simplify, and speedup to_natsort_key() in common case, by removing handling of weird charsets utf16/32, that encode numbers in several bytes. In rare cases utf16/32 is used, we'll convert to utf8 prior to creating keys, and back to original charset afterwards.
Showing
This diff is collapsed.
Please register or sign in to comment