MDEV-30351 crash in Item_func_left::val_str
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:Alexander Barkov <bar@mariadb.com> Reviewed-by:
Daniel Black <daniel@mariadb.org>
Showing
Please register or sign in to comment