mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-34295 CAST(char_col AS DOUBLE) prints redundant spaces in a warning
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.
This commit is contained in:
@ -1171,7 +1171,7 @@ SET j= 1 + i;
|
||||
END|
|
||||
CALL ctest();
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'string '
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'string'
|
||||
DROP PROCEDURE ctest;
|
||||
CREATE PROCEDURE vctest()
|
||||
BEGIN
|
||||
|
Reference in New Issue
Block a user