mirror of
https://github.com/MariaDB/server.git
synced 2026-04-29 19:55:32 +02:00
Bug#11765923 58937: MANY VALGRIND ERRORS AFTER GROUPING BY RESULT OF DECIMAL COLUMN FUNCTION
Bug#11764671 57533: UNINITIALISED VALUES IN COPY_AND_CONVERT (SQL_STRING.CC) WITH CERTAIN CHA When ROUND evaluates decimal result it uses Item::decimal value as fraction value for the result. In some cases Item::decimal is greater than real result fraction value and uninitialised memory of result(decimal) buffer can be used in further calculations. Issue is introduced by Bug33143 fix. The fix is to remove erroneous assignment. mysql-test/r/func_math.result: test case mysql-test/t/func_math.test: test case sql/item_func.cc: remove erroneous assignment
This commit is contained in:
parent
dba184237a
commit
90bbf9d615
3 changed files with 38 additions and 3 deletions
|
|
@ -2122,10 +2122,7 @@ my_decimal *Item_func_round::decimal_op(my_decimal *decimal_value)
|
|||
if (!(null_value= (args[0]->null_value || args[1]->null_value ||
|
||||
my_decimal_round(E_DEC_FATAL_ERROR, value, (int) dec,
|
||||
truncate, decimal_value) > 1)))
|
||||
{
|
||||
decimal_value->frac= decimals;
|
||||
return decimal_value;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue