mirror of
https://github.com/MariaDB/server.git
synced 2026-05-02 21:25:36 +02:00
fixed Bug #3051 "FLOOR returns invalid"
mysql-test/r/func_math.result: added test for Bug #3051 "FLOOR returns invalid" mysql-test/t/func_math.test: added test for Bug #3051 "FLOOR returns invalid"
This commit is contained in:
parent
709325d176
commit
bc9de3d455
3 changed files with 16 additions and 1 deletions
|
|
@ -572,7 +572,8 @@ longlong Item_func_ceiling::val_int()
|
|||
|
||||
longlong Item_func_floor::val_int()
|
||||
{
|
||||
double value=args[0]->val();
|
||||
// the volatile's for BUG #3051 to calm optimizer down (because of gcc's bug)
|
||||
volatile double value=args[0]->val();
|
||||
null_value=args[0]->null_value;
|
||||
return (longlong) floor(value);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue