• mithun's avatar
    Bug #11755818 : LIKE DOESN'T MATCH WHEN CP932_BIN/SJIS_BIN · f8893dc4
    mithun authored
                    COLLATIONS ARE USED.
    
    ISSUE :
    -------
    Code points of HALF WIDTH KATAKANA in SJIS/CP932 range from
    A1 to DF. In function my_wildcmp_mb_bin_impl while comparing
    such single byte code points, there is a code which compares
    signed character with unsigned character. Because of this,
    comparisons of two same code points representing a HALF
    WIDTH KATAKANA character always fails.
    
    Solution:
    ---------
    A code point of HALF WIDTH KATAKANA at-least need 8 bits.
    Promoting the variable from uchar to int will fix the issue.
    
    mysql-test/t/ctype_cp932.test:
      Tests which have conditions
      LIKE 'STRING PATTERN WITH HALF WIDTH KATAKANA'.
    strings/ctype-mb.c:
      A code point of HALF WIDTH KATAKANA at-least need 8 bits.
      Promoting the variable from uchar to int will fix the issue.
    f8893dc4
ctype-mb.c 41.1 KB