1. 14 Oct, 2021 2 commits
    • Vladislav Vaintroub's avatar
      MDEV-4742 - address review comments. · b3cedf63
      Vladislav Vaintroub authored
      - 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.
      b3cedf63
    • Vladislav Vaintroub's avatar
      MDEV-4742 - provide function to sort string in "natural" order · 5b29d407
      Vladislav Vaintroub authored
      The numbers should be compared as numbers,  while the rest should be compared
      as string.
      
      Introduce natural_sort_key() function that transforms original string
      so that the lexicographic order of such keys is suitable for
      natural sort.
      5b29d407
  2. 13 Oct, 2021 12 commits
  3. 12 Oct, 2021 21 commits
  4. 11 Oct, 2021 5 commits