Bug #68688 | IFNULL of SET & ENUM less sensitive than IF to numeric context | ||
---|---|---|---|
Submitted: | 16 Mar 2013 0:45 | Modified: | 19 Mar 2013 2:46 |
Reporter: | Programmer Old | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Data Types | Severity: | S2 (Serious) |
Version: | 5.5.8-log | OS: | Windows (Vista) |
Assigned to: | CPU Architecture: | Any |
[16 Mar 2013 0:45]
Programmer Old
[16 Mar 2013 16:10]
MySQL Verification Team
It does seem inconsistent. A workaround is this, all queries return the same: select m,if(m is not null, m, 21) + 1 from v; select m,ifnull(m+0, 21) + 1 from v; select m,coalesce(m+0 ,21) + 1 from v;
[19 Mar 2013 2:46]
Programmer Old
Do not ignore the complete lack of warning that the character-string form of the SET was turned to 0, in contrast to <code>'a,b' + 1</code>.