| Bug #21016 | using conditional operators against a float does not work | ||
|---|---|---|---|
| Submitted: | 12 Jul 2006 20:30 | Modified: | 12 Jul 2006 22:58 |
| Reporter: | Shane Drinkwater | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 5.0.22 | OS: | Linux (Red Hat ES4 Linux) |
| Assigned to: | CPU Architecture: | Any | |
[12 Jul 2006 22:58]
MySQL Verification Team
Thank you for the bug report. Please read the below Manual section: http://dev.mysql.com/doc/refman/5.0/en/problems-with-float.html for explanations why you are getting these results. I suggest you to use decimal data type for that kind of use.

Description: I am unable to do <,>,= where I use expectedHigh(float type) How to repeat: create a table ind integer autoinc expectedhigh float insert 3 rows of expectedhigh = 5.7 Then run the following SQL -- select * from test where expectedHigh <> 5.7 -- I get every row in the table I should get zero rows(every row is 5.7 for expected High). If I change the query to --- select * from test where expectedHigh = 5.7 -- I get zero rows. I should see the rows in the table that equal 5.7. Thank you for your time Shane 563-556-2010 Ext 174 Shane_Drinkwater@pa-ucl.com