• Alexander Barkov's avatar
    MDEV-30695 Refactor case folding data types in Asian collations · 33f8f92b
    Alexander Barkov authored
    This is a non-functional change and should not change the server behavior.
    
    Casefolding information is now stored in items of a new data type MY_CASEFOLD_CHARACTER:
    
    typedef struct casefold_info_char_t
    {
      uint32 toupper;
      uint32 tolower;
    } MY_CASEFOLD_CHARACTER;
    
    Before this change, casefolding tables for Asian collations were stored in:
    
    typedef struct unicase_info_char_st
    {
      uint32 toupper;
      uint32 tolower;
      uint32 sort;
    } MY_UNICASE_CHARACTER;
    
    The "sort" member was not used in the code handling Asian collations,
    it only wasted space.
    (it's only used by Unicode _general_ci and _general_mysql500_ci collations).
    
    Unicode collations (at least UCA and _bin) should also be refactored later,
    but under terms of a separate task.
    33f8f92b
ctype-ujis.c 3.46 MB
The source could not be displayed because it is larger than 1 MB. You can load it anyway or download it instead.