Bug #50757 | SELECT 0 in ('a','b') returns TRUE | ||
---|---|---|---|
Submitted: | 30 Jan 2010 16:59 | Modified: | 2 Feb 2010 10:53 |
Reporter: | Peufeu Peufeu | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S2 (Serious) |
Version: | 5.0.51a-3ubuntu5.4 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[30 Jan 2010 16:59]
Peufeu Peufeu
[1 Feb 2010 8:18]
Sveta Smirnova
Thank you for the report. According to http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html: "Strict mode controls how MySQL handles input values that are invalid or missing." Values for which you are not getting errors are not input, so behavior is expected.
[2 Feb 2010 10:53]
Peufeu Peufeu
in the following query, 0, 'a', and 'b' are input values, and 'a' and 'b' are invalid input values, since they are not convertable to integer type. Same for all examples above. mysql> SELECT 0 in ('a','b'); +----------------+ | 0 in ('a','b') | +----------------+ | 1 | +----------------+ 1 row in set, 2 warnings (0.00 sec)