| Bug #110819 | EXISTS with dependent subquery can return incorrect results | ||
|---|---|---|---|
| Submitted: | 26 Apr 2023 15:11 | Modified: | 27 Apr 2023 7:43 |
| Reporter: | Chehai Wu | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S2 (Serious) |
| Version: | 8.0.16+, 8.0.33 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | regression | ||
[26 Apr 2023 15:11]
Chehai Wu
[26 Apr 2023 15:57]
Chehai Wu
Disabling semijoin (set optimizer_switch='semijoin=off';) can fix the issue.
[27 Apr 2023 7:43]
MySQL Verification Team
Hello Chehai Wu, Thank you for the report and test case. Verified as described. regards, Umesh
[8 May 2023 22:48]
Dag Wanvik
Posted by developer:
Bisect says:
d538f0b38d147e574d6833b14a79dcfd7a8ce4b1 is the first bad commit
commit d538f0b38d147e574d6833b14a79dcfd7a8ce4b1
Author: Roy Lyseng <roy.lyseng@oracle.com>
Date: Wed Nov 14 14:03:16 2018 +0100
WL#4389 Transform EXISTS subqueries to semi-join
Extend semi-join check to accept EXISTS subqueries in addition to IN.
Filter out non-deterministic subqueries.
