• mithun's avatar
    Bug #14057034 : WASTED CPU CYCLES IN MY_UTF8_UNI WHERE · 8934a80b
    mithun authored
                    RESULTING MY_WC_T RESULT IS NOT USED
    Issue         : handler functions my_ismbchar_utf8,
                  my_well_formed_len_mb for charset utf8
                  is calling unicode converion function
                  to validate and to find the character
                  length. Because of this, instructions
                  which will convert the utf8 to unicode
                  are executed for no use.
                  A similar issue exist with charset utf8mb4
    Solution      : reorganized the code such that character
                  validation part of unicode conversion
                  handler is extracted(duplicated) in to
                  separate function. Hence
                  my_ismbchar_utf8, my_well_formed_len_mb
                  will call the new function which only
                  validates and return the length of mb(utf8).
                  A similar fix for charset utf8mb4.
    8934a80b
ctype-utf8.c 223 KB