• Alexander Barkov's avatar
    MDEV-34295 CAST(char_col AS DOUBLE) prints redundant spaces in a warning · 5e12d492
    Alexander Barkov authored
    Field_string::val_int(), Field_string::val_real(), Field_string::val_decimal()
    passed the whole buffer of field_length bytes to data type conversion routines.
    This made conversion routines to print redundant trailing spaces in case of warnings.
    
    Adding a method Field_string::to_lex_cstring() and using it inside
    val_int(), val_real(), val_decimal(), val_str().
    
    After this change conversion routines get the same value with what val_str() returns,
    and no redundant trailing spaces are displayed.
    5e12d492
field.cc 332 KB