MDEV-20548 Unexpected error on CREATE..SELECT HEX(num)
Item_func_hex::fix_length_and_dec() evaluated a too short data type for signed numeric arguments, which resulted in a 'Data too long for column' error on CREATE..SELECT. Fixing the code to take into account that a short negative numer can produce a long HEX value: -1 -> 'FFFFFFFFFFFFFFFF' Also fixing Item_func_hex::val_str_ascii_from_val_real(). Without this change, MTR test with HEX with negative float point arguments failed on some platforms (aarch64, ppc64le, s390-x).
Showing
Please register or sign in to comment