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.
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.
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?
Fixed in 3.23.26-1 which I plan on releasing as a bugfix update soonish - thanks a lot for the report.
Sorry, not fixed in -1. Workaround is to compile with -O1 - we'll fix this after fixing the bug in the compiler.
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.