Bug #2082 | mysqldump converts "inf" to NULL | ||
---|---|---|---|
Submitted: | 10 Dec 2003 12:12 | Modified: | 5 Mar 2004 11:22 |
Reporter: | Peter Zaitsev (Basic Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | OS: | ||
Assigned to: | Victor Vagin | CPU Architecture: | Any |
[10 Dec 2003 12:12]
Peter Zaitsev
[11 Dec 2003 10:23]
MySQL Verification Team
Behaviour is proper, but has to be documented.
[30 Jan 2004 21:40]
Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant product(s). Additional info: This behavior is now documented.
[10 Feb 2004 20:28]
Arjen Lentz
Re-opened. While Docs can document the current behaviour (and has done so), the argument "it is proper" appears odd. If a regular select somehow returns inf, and after mysqldump and restore that same select suddenly returns NULL, then the backup is incorrect. The idea of a backup is to be able to reproduce an exact copy of the original. The current behaviour breaks that behaviour.
[10 Feb 2004 20:42]
Peter Zaitsev
And More test cases to show this behavior is inconsistent on the top of everything 1) Try to dump and restore this table. Too large number which grew large enough to be inf magically becomes 0. create table tmp(c double not null); insert into tmp values(1e+500); select * from tmp; 2) Try backup and restore of this table using SELECT INTO OUTFILE /LOAD DATA INFILE or "mysqldump --tab" it works ! 3) Try changing "double" to "float" in this case to get behavior more inline with MySQL behavior in other cases - You'll get maximum allowed float value instead of inf.
[11 Feb 2004 10:17]
Sergei Golubchik
1. I failed to repeat "becomes 0" here 2. it doesn't. (at least on FreeBSD) It's bug#2595 - atof() behavoir is not portable. On some systems it reads "inf", on others - it doesn't. See bug#2595. 3. architecture-specific behaviour, not portable either
[17 Feb 2004 8:17]
Victor Vagin
bk commit - 4.1 tree (vva:1.1706)
[5 Mar 2004 11:22]
Victor Vagin
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release. If necessary, you can access the source repository and build the latest available version, including the bugfix, yourself. More information about accessing the source trees is available at http://www.mysql.com/doc/en/Installing_source_tree.html Additional info: we forbidded to store inf in fields fix will be in mysql-4.1.2