Bug 18620 - strange values in float type columns
strange values in float type columns
Product: Red Hat Linux
Classification: Retired
Component: mysql (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Patrick Macdonald
David Lawrence
Depends On: 19604
  Show dependency treegraph
Reported: 2000-10-07 18:46 EDT by Slawomir Bialek
Modified: 2007-04-18 12:29 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-10-25 14:59:28 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Slawomir Bialek 2000-10-07 18:46:32 EDT
mysql> create table test (col1 float8);
Query OK, 0 rows affected (0.00 sec)
mysql> insert into test values (0);
Query OK, 1 row affected (0.00 sec)
mysql> select * from test;
| col1                  |
| 2.18942949477526e-314 |
1 row in set (0.00 sec)
It could be glibc or gcc bug.
Comment 1 Trond Eivind Glomsrxd 2000-10-07 21:52:42 EDT
Hardly a bug... this is about as close to zero as you can get it. With floating
point arithmetic you don't get exact answers (you can't represent an infinite
amount of numbers in a finite numbers of bits). Granted, 0 can be represented
exactly... but any operation to it, or yielding such a number would probably
result in something similar to what you are seeing.
Comment 2 Trond Eivind Glomsrxd 2000-10-09 10:55:56 EDT
OK, it happens with other values (like "1") as well - they're also  the same
number according to mysql.  According to the reporter (private mail) the same
package  compiled on Red Hat Linux 6.2 also works (same mail). Jakub, could you
take a look at it?
Comment 3 Trond Eivind Glomsrxd 2000-10-18 16:57:47 EDT
Fixed in 3.23.26-1 which I plan on releasing as a bugfix update soonish - thanks
a lot for the report.
Comment 4 Trond Eivind Glomsrxd 2000-10-23 10:45:31 EDT
Sorry, not fixed in -1. Workaround is to compile with -O1 - we'll fix this after
fixing the bug in the compiler.
Comment 5 Trond Eivind Glomsrxd 2000-10-25 15:02:21 EDT
Fixed in 3.23.26-1.2, which includes the patch mentioned in bug #19604. It has
been upstreamed, and I expect to release an errata later.

Note You need to log in before you can comment on or make changes to this bug.