• Weijun Huang's avatar
    MDEV-30351 crash in Item_func_left::val_str · f70de145
    Weijun Huang authored
    When using LEFT() function with a string that is without a charset,
    the function crashes. This is because the function assumes that
    the string has a charset, and tries to use it to calculate the
    length of the string.
    
    Two functions, UNHEX and WEIGHT_STRING, returned a string without
    the charset being set to a not null value.
    
    The fix is to set charset when calling val_str on these two functions.
    Reviewed-by: default avatarAlexander Barkov <bar@mariadb.com>
    Reviewed-by: default avatarDaniel Black <daniel@mariadb.org>
    f70de145
func_str.result 191 KB