Bug #42738 | integers not being cast as strings when compared against varchars | ||
---|---|---|---|
Submitted: | 10 Feb 2009 20:44 | Modified: | 10 Feb 2009 21:22 |
Reporter: | mark konetchy | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S1 (Critical) |
Version: | 5.0.51 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | cast, comparison, conversion |
[10 Feb 2009 20:44]
mark konetchy
[10 Feb 2009 20:45]
mark konetchy
the fix should be to cast everything thats being compared to a char datatype to a char.
[10 Feb 2009 20:47]
Paul DuBois
The string will be converted to a number, not the number to a string. http://dev.mysql.com/doc/refman/5.1/en/type-conversion.html
[10 Feb 2009 21:22]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Please read about Type Conversion in Expression Evaluation at http://dev.mysql.com/doc/refman/5.0/en/type-conversion.html