Repository navigation
Conversation
…rived table A constant column of a merged derived table on the inner side of an outer join depends on its first inner table, but the subquery that refers to it did not, because used_tables_for_level() only reports Item_field columns. The subquery then returned wrong results for NULL-complemented rows. Also add the first inner table of such view references to the subquery's used tables, both when resolving the outer reference and after semi-join pullout.
|
Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application. When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated. If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public. |
|
The Debug build and MTR failures are unrelated to this change: CMake fails at |
|
Yes you are right @ToKliar I am looking into it |
|
Note: Bug#121574 was closed as a duplicate of Bug#121454, but they are |
What does this change do?
Fixes BUG#121574 (https://bugs.mysql.com/bug.php?id=121574): a subquery that
refers to a constant column of a merged derived table on the inner side of an
outer join returns wrong results for NULL-complemented rows.
Why is it needed?
The constant column depends on the derived table's first inner table, but
used_tables_for_level()only reportsItem_fieldcolumns, so the containingsubquery did not depend on that table. The fix adds it to the subquery's used
tables when resolving the outer reference and after semi-join pullout.
How was it tested?
mysql-test/scripts/ci/mtr.shpasses locallyContributor checklist
scripts/ci/format.sh)AI assistance
Areas touched
optimizer