| Bug #108981 | function NULLIF(ASCII()) acts abnormally in select statements | ||
|---|---|---|---|
| Submitted: | 3 Nov 2022 10:35 | Modified: | 3 Nov 2022 14:18 |
| Reporter: | Brian Yue (OCA) | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
| Version: | 8.0 | OS: | Any (rhel-7.4) |
| Assigned to: | CPU Architecture: | Any (x86-64) | |
[3 Nov 2022 10:35]
Brian Yue
[3 Nov 2022 14:18]
MySQL Verification Team
Hi Mr. Yue, Thank you for your bug report. We tested it fully and got the same results. Verified as reported.
[14 Nov 5:59]
Xinhao Zhao
This modification may help. diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 0c055cd89ad..fceeeac56fc 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1269,8 +1269,8 @@ bool Arg_comparator::set_cmp_func(Item_result_field *owner_arg, Item **left_arg, } THD *thd = current_thd; - left = cache_converted_constant(thd, left, &left_cache, type); - right = cache_converted_constant(thd, right, &right_cache, type); + *left = *cache_converted_constant(thd, left, &left_cache, type); + *right = *cache_converted_constant(thd, right, &right_cache, type); return set_compare_func(owner_arg, type); }
