[MDEV-23366] ROUND(18446744073709551615,rand()*0) returns a wrong result Created: 2020-08-02  Updated: 2020-08-03  Resolved: 2020-08-03

Status: Closed
Project: MariaDB Server
Component/s: Data types
Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.4.14, 10.5.5

Type: Bug Priority: Major
Reporter: Alexander Barkov Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-23032 FLOOR()/CEIL() incorrectly calculate ... Closed

 Description   

SELECT
  ROUND(18446744073709551615,rand()*0) AS c1,
  ROUND(18446744073709551615.0,rand()*0) AS c2;

+----------------------+------------------------+
| c1                   | c2                     |
+----------------------+------------------------+
| 18446744073709552000 | 18446744073709551615.0 |
+----------------------+------------------------+

The result for c1 is wrong. It should be equal to 18446744073709551615, like c2, just without the '.0' part.


Generated at Thu Feb 08 09:21:52 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.