Description:
With MySQL server 5.1.50 and 5.1.51
Double max value 1.7976931348623157E+308(idem min value) return a wrong value in select and mysqldump. The returned value: 1.79769313486232e+308 is out of range.
When you want to import dump file, you get this error message :
ERROR 1367 (22007) at line 40: Illegal double '1.79769313486232e+308' value found during parsing
...
You can't load your dump file!
N.B: It's ok in 5.5.6 RC
How to repeat:
1) Select
CREATE TABLE `test`.`T1` (`id` INT NOT NULL ,`val` DOUBLE NULL , PRIMARY KEY (`id`) );
INSERT INTO T1 VALUES (2,1.7976931348623157E+308);
select * from T1;
+----+------------------------+
| id | val |
+----+------------------------+
| 2 | 1.79769313486232e+308 |
+----+------------------------+
The value (of val) is not the same (rounded) and out of range
(> 1.7976931348623157E+308)
2) Dump (mysqldump.exe)
...
--
-- Dumping data for table `t1`
--
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
INSERT INTO `t1` VALUES (2,1.79769313486232e+308);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
...
Suggested fix:
For dump file, to replace 1.79769313486232e+308 by 1.7976931348623157E+308
For MySQL Server : to return the good value (not rounded): 1.7976931348623157E+308
It's ok in 5.5.6 RC