Bug #45403 unintuitive type conversion rules
Submitted: 9 Jun 2009 15:14
Reporter: Scott Noyes Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Data Types Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[9 Jun 2009 15:14] Scott Noyes
Description:
The rules governing automatic type conversion during a comparison operation do not accommodate the intentions of the schema designer. Consider adding an sql_mode that would raise errors on mismatched type comparisons, similar to the behavior when inserting an invalid type in strict mode.

How to repeat:
SELECT 'test' = 0; -- Returns true, should raise an error instead

Suggested fix:
Add sql_mode to mimic strict mode for comparisons