Bug #114703 | The different use of in and = before subquery leads to the change of SQL result | ||
---|---|---|---|
Submitted: | 19 Apr 2024 14:08 | Modified: | 25 Apr 2024 13:48 |
Reporter: | shu William | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 8.0.28 | OS: | CentOS (7.9) |
Assigned to: | CPU Architecture: | x86 (x86_64) | |
Tags: | subquery |
[19 Apr 2024 14:08]
shu William
[19 Apr 2024 15:38]
MySQL Verification Team
HI Mr. William, Thank you for your bug report. However, this is not a bug. IN operator is identical with = ANY combination. Without ANY, ALL or similar, you can not know which value will be used for comparison. That is according to SQL standard.
[20 Apr 2024 12:21]
shu William
There is only one result of the subquery. pls check explain and subquery Why is the result set different? I don't think = and in should cause it.
[22 Apr 2024 3:16]
shu William
There is only one result of the subquery. pls check explain and subquery again Why is the result set different? I don't think = and in should cause it.
[22 Apr 2024 10:10]
MySQL Verification Team
Hi Mr. William, Thank you for your comments. Let us inform you that this is a forum for the bug reports with repeatable test cases. The test case should contain a set of SQL statements that always leads to the bug that you are reporting. We do not see DDL and DML statements that would enable us to run your queries. Next, you are using an old release of 8.0. Please, try with the latest release available. Not a bug.
[23 Apr 2024 23:47]
shu William
This is a query statement, not DDL or DML.I provided the result set of the query, in the attachment. pls check
[24 Apr 2024 10:45]
MySQL Verification Team
HI, We have analysed your result set and determined that result sets are consistent. Thanks for your interest in MySQL.
[25 Apr 2024 13:48]
shu William
Did you really check the result set? The first line is inconsistent.
[25 Apr 2024 14:14]
MySQL Verification Team
Hi Mr. William, Thank you for your feedback. However, we have two problems with your bug report. First of all, this is a forum for the reports with fully repeatable test cases. Such a test case should consist of a set of SQL statements that would always show the bug that you report. We have never received such a test case from you. We have only the queries and not the entire tables. Second, you have provided us with 5 (five) different results sets , so we do not know which ones of those five sets are you comparing. Third, we repeat that IN and = ANY statements are identical, as per SQL standard. Fourth, if you use only = before nested query and that nested query returns more then one result, then you should get an error. Fifth, you should check your queries against 8.0.36 and not against 8.0.28. Hence, we have lot's of feedback to get from you in this report.