mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
Bug #17043: Casting trimmed string to decimal loses precision
Results of string functions were being converted to decimals by first being converted to integers, resulting in a loss of precision. mysql-test/r/func_str.result: Add new results mysql-test/t/func_str.test: Add new regression test sql/item_strfunc.cc: Convert string function results to decimal using string-to-decimal conversion sql/item_strfunc.h: Add Item_str_func::val_decimal()
This commit is contained in:
parent
358e08836a
commit
d48cfa8ac7
4 changed files with 33 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ public:
|
|||
Item_str_func(List<Item> &list) :Item_func(list) {decimals=NOT_FIXED_DEC; }
|
||||
longlong val_int();
|
||||
double val_real();
|
||||
my_decimal *val_decimal(my_decimal *);
|
||||
enum Item_result result_type () const { return STRING_RESULT; }
|
||||
void left_right_max_length();
|
||||
String *check_well_formed_result(String *str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue