Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.5.40
-
None
-
None
Description
MariaDB [test]> select 1 % 0.00000000000000000000000000000032349 ; |
+-------------------------------------------+ |
| 1 % 0.00000000000000000000000000000032349 |
|
+-------------------------------------------+ |
| 0.000000000000000000000000000000 |
|
+-------------------------------------------+ |
1 row in set (0.00 sec) |
Technically, the second operand is outside DECIMAL precision (it has 30 zeros after the point), so it wouldn't be strange if the query considered it 0 and produced 0. But the current result is difficult to explain.
MySQL 5.5 and PostgreSQL return a non-zero value:
postgres=# select 1 % 0.00000000000000000000000000000032349 ; |
?column? |
---------------------------------------
|
0.00000000000000000000000000000018574
|
MySQL [test]> select 1 % 0.00000000000000000000000000000032349 ; |
+-------------------------------------------+ |
| 1 % 0.00000000000000000000000000000032349 |
|
+-------------------------------------------+ |
| 0.00000000000000000000000000000018574 |
|
+-------------------------------------------+ |
1 row in set (0.00 sec) |
Attachments
Issue Links
- relates to
-
MDEV-6841 test decimal math
- Open