• Alexander Barkov's avatar
    MDEV-31069 Reuse duplicate char-to-weight conversion code in ctype-utf8.c and ctype-ucs2.c · 2ad287ca
    Alexander Barkov authored
    Removing similar functions from ctype-utf8.c and ctype-ucs2.c
    
    - my_tosort_utf16()
    - my_tosort_utf32()
    - my_tosort_ucs2()
    - my_tosort_unicode()
    
    Adding new shared functions into ctype-unidata.h:
    
    - my_tosort_unicode_bmp()  - reused for utf8mb3, ucs2
    - my_tosort_unicode()      - reused for utf8mb4, utf16, utf32
    
    For simplicity, the new version of my_tosort_unicode*()
    does not include the code handling the MY_CS_LOWER_SORT flag because:
    - it affects performance negatively
    - we don't have any collations with this flag yet anyway
    (This code was most likely earlier erroneously merged from
    MySQL's utf8_tolower_ci at some point.)
    2ad287ca
ctype-utf8.c 386 KB