Bug #112306 | Unexpected Result by JOIN_SUFFIX | ||
---|---|---|---|
Submitted: | 11 Sep 2023 1:49 | Modified: | 12 Sep 2023 11:26 |
Reporter: | JINSHENG BA | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 8.1.0, 8.0.34 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[11 Sep 2023 1:49]
JINSHENG BA
[11 Sep 2023 4:59]
MySQL Verification Team
Hello Jinsheng Ba, Thank you for the report and test case. Verified as described. regards, Umesh
[12 Sep 2023 11:25]
Knut Anders Hatlen
Posted by developer: This bug appears to have the same cause as bug#112296, so I'm closing it as a duplicate. The issue is that WHERE (t0.c0 IS NOT NULL) = (BIT_COUNT(t3.c2)) is incorrectly considered NULL-rejecting on table t0, so the optimizer ends up pruning a too big subtree from the join when it detects that t0 will return only NULL-complemented rows. Bug#112296 has a similar IS NOT NULL predicate on a pruned table, and suffers from the same issue.