1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Fix for bug #31236: Inconsistent division by zero behavior for

floating point numbers

Some math functions did not check if the result is a valid number
(i.e. neither of +-inf or nan).

Fixed by validating the result where necessary and returning NULL in
case of invalid result.
This commit is contained in:
kaa@kaamos.(none)
2008-02-20 00:33:43 +03:00
parent 947529acf3
commit 8d222210c7
11 changed files with 62 additions and 82 deletions

View File

@@ -822,7 +822,6 @@ INSERT INTO t1 (col2) VALUES (-1.1E-3);
INSERT INTO t1 (col1) VALUES ('+1.8E+309');
--error 1264
INSERT INTO t1 (col2) VALUES ('-1.2E-3');
--error 1264
UPDATE t1 SET col1 =col1 * 5000 WHERE col1 > 0;
--error 1365
UPDATE t1 SET col2 =col2 / 0 WHERE col2 > 0;