Bug #112238 | Inconsistent results caused by FIELD() | ||
---|---|---|---|
Submitted: | 1 Sep 2023 16:08 | Modified: | 4 Sep 2023 8:37 |
Reporter: | Zuming Jiang | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S2 (Serious) |
Version: | 5.5, 5.6, 5.7.43, 8.0.34 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[1 Sep 2023 16:08]
Zuming Jiang
[4 Sep 2023 8:37]
MySQL Verification Team
Hello Zuming Jiang, Thank you for the report and test case. regards, Umesh
[11 Sep 2023 11:28]
huahua xu
For test case 1, the result type of `case when true then ('Q' || 'k') else '?;' end` is `STRING_RESULT` and all other parameters' result type is `STRING_RESULT`, so the compare type of function `Item_func_field` is `STRING_RESULT`. For test case 2, the result type of `('Q' || 'k')` is `INT_RESULT` and all other parameters' result type is `STRING_RESULT`, so the compare type of function `Item_func_field` is `REAL_RESULT`.