Bug #51705 | Bad implicit CAST in WHERE clause between different types | ||
---|---|---|---|
Submitted: | 3 Mar 2010 23:12 | Modified: | 4 Mar 2010 4:22 |
Reporter: | Ervin Hegedus | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S3 (Non-critical) |
Version: | 5.0.51a-21 (Debian) | OS: | Linux |
Assigned to: | CPU Architecture: | Any | |
Tags: | where clause implicit cast |
[3 Mar 2010 23:12]
Ervin Hegedus
[4 Mar 2010 4:22]
Valeriy Kravchuk
This is explained in the manual, http://dev.mysql.com/doc/refman/5.0/en/type-conversion.html. In your case the following statement applies: "In all other cases, the arguments are compared as floating-point (real) numbers." If you need something else use explicit CAST(). And yes, all RDBMSes are different, and MySQL differs from PostgreSQL in this case.