Bug #10816 Float values
Submitted: 24 May 2005 8:31 Modified: 25 May 2005 0:21
Reporter: Sergi Vergés Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.3 nt beta OS:Windows (Windows 2000)
Assigned to: Bugs System CPU Architecture:Any

[24 May 2005 8:31] Sergi Vergés
Description:
When inserting or updating float(15,5) filed, with a value like 5183.41 when you query the value it returns 5183.41016.
This values is not correct, becauses it isn't which I've inserted.

How to repeat:
- create a table
create table t (a float(15,5));

- insert into t(a) values(5183.41);
- select * from t;
[24 May 2005 9:29] Vasily Kishkin
Tested on Win 2000 Sp4, MySQL server 5.0.6 beta
[24 May 2005 14:51] David Ribas
I reproduced it in 5.0.3-beta-standard for Linux. I tried it using double(15, 5) and numeric(15,5) instead of float(15, 5) and apparently both worked fine.

Hope this helps.
[25 May 2005 0:21] MySQL Verification Team
This is an expected behavior when handling floating point
numbers. For further information for, please see:

http://dev.mysql.com/doc/mysql/en/problems-with-float.html