Bug #111265 | Return wrong result | ||
---|---|---|---|
Submitted: | 3 Jun 2023 3:40 | Modified: | 6 Jun 2023 12:10 |
Reporter: | Doris Li | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 8.0.33 | OS: | Ubuntu (20.04.2) |
Assigned to: | CPU Architecture: | x86 (x86_64) |
[3 Jun 2023 3:40]
Doris Li
[3 Jun 2023 3:43]
Doris Li
select 1 from (select char(data_b_tmp.a3) > -1 from data_b_tmp right join data_a_tmp using (a3)) tmp(a3); +---+ | 1 | +---+ | 1 | | 1 | | 1 | | 1 | | 1 | | 1 | | 1 | | 1 | | 1 | | 1 | | 1 | +---+ 11 rows in set (0.00 sec) This query also return the correct result.
[5 Jun 2023 7:49]
Doris Li
Please verify if it is a true bug, thx.
[6 Jun 2023 12:10]
MySQL Verification Team
Hi Mrs. Li, Thank you for your bug report. However, it is not a bug. You can not compare floating point values with equality operator ('=') or with USING. You can do that with INTeger values. For floating point types, you have to check the values in tuples within a range. This is explained in our Reference Manual, in the section on Data Types. Not a bug.