Bug #110502 | Incorrect output of FIELD function | ||
---|---|---|---|
Submitted: | 25 Mar 2023 22:03 | Modified: | 28 Mar 2023 6:11 |
Reporter: | Zuming Jiang | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
Version: | 8.0, 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[25 Mar 2023 22:03]
Zuming Jiang
[26 Mar 2023 7:39]
MySQL Verification Team
Hello Zuming Jiang, Thank you for the report and test case. regards, Umesh
[27 Mar 2023 13:06]
Tor Didriksen
Posted by developer: select FIELD('o', null, '); the function operates on strings, 'o' and ' are not equal select FIELD('o', null + 1, '); the function operates on doubles, and both 'o' and ' convert to 0.0 https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_field