Bug #102291 | Subquery produces wrong result when set big_tables = 1 | ||
---|---|---|---|
Submitted: | 19 Jan 2021 9:17 | Modified: | 19 Jan 2021 9:43 |
Reporter: | xiaoyang chen | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S1 (Critical) |
Version: | 8.0, 8.0.22, 8.0.23 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[19 Jan 2021 9:17]
xiaoyang chen
[19 Jan 2021 9:17]
xiaoyang chen
The second query is ``` mysql> set big_tables = 1; Query OK, 0 rows affected (0.00 sec) mysql> select a from t1 join (select count(a) as cnt from t2 union select 1 limit 1, 1) as derived_1_2(cnt) on (true) where t1.a > derived_1_2.cnt; +------+ | a | +------+ | 3 | | 4 | +------+ 2 rows in set (0.01 sec) ```
[19 Jan 2021 9:43]
MySQL Verification Team
Hello xiaoyang chen, Thank you for the report and test case. Verified as described. regards, Umesh