[MDEV-3661] LP:482846 - integer math errors with large numbers and no errors or warnings given Created: 2009-11-14 Updated: 2012-10-04 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | archivist (Inactive) | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
mysql> select version();
-----------------------------
----------------------------- mysql> SELECT 4294967296 * 4294967296;
-------------------------
------------------------- mysql> show warnings; mysql> SELECT 3037000500 * 3037000500;
-------------------------
------------------------- mysql> show warnings; mysql> SELECT 4294967296 * 4294967297;
-------------------------
------------------------- mysql> show warnings; mysql> SELECT 4294967296 * 4294967298;
-------------------------
------------------------- mysql> show warnings; mysql> SELECT 4294967296.0 * 4294967298.0;
-----------------------------
----------------------------- mysql> show warnings; mysql> quit; adding a .0 to the large number gets it to use float/double maths, the integer maths does not seem to check its range or overflow conditions correctly thus giving incorrect results.
|
| Comments |
| Comment by Michael Widenius [ 2009-11-17 ] |
|
Re: integer math errors with large numbers and no errors or warnings given Not much we can do with this, as we are trying to be compatible with MySQL. We should however consider to find a way to create a warning in cases when you get overflow. I will create a worklog entry for this. |
| Comment by Rasmus Johansson (Inactive) [ 2009-11-17 ] |
|
Launchpad bug id: 482846 |