Bug #109032 | Result set is incorrect. | ||
---|---|---|---|
Submitted: | 9 Nov 2022 3:18 | Modified: | 6 Dec 2022 1:20 |
Reporter: | Xiong Wang | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S1 (Critical) |
Version: | 8.0.30, 8.0.31 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | regression |
[9 Nov 2022 3:18]
Xiong Wang
[9 Nov 2022 8:04]
MySQL Verification Team
Hello Xiong Wang, Thank you for the report and feedback. regards, Umesh
[6 Dec 2022 1:20]
Jon Stephens
Documented fix as follows in the MySQL 8.0.33 changelog: A view reference whose underlying field is a constant is not marked as constant when the reference is part of an inner table of an outer join. It was found that, when pushing a condition down to a derived table, the reference was stripped off and only the underlying field was cloned, which made it a constant, and led to wrong results. To fix this, we ensure that we do not push such a condition down to the derived table by adding a check to see first whether the table used by the condition matches the derived table or is a constant expression; only when it is one or the other of these do we push the condition down. Closed.