Re: [Maria-developers] [Commits] Rev 3552: Fix bug MDEV-4648 SQ pushdown: Wrong result (missing rows) with materialization+semijoin, IN and ALL subqueries, UNION in file:///home/tsk/mprog/src/10.0-md83/
![](https://secure.gravatar.com/avatar/548f6a7ca82fc307ee146f412b04905c.jpg?s=120&d=mm&r=g)
09.08.2013 14:30, timour@askmonty.org пишет:
At file:///home/tsk/mprog/src/10.0-md83/
------------------------------------------------------------ revno: 3552 revision-id: timour@askmonty.org-20130809113013-ia2f7zzw3mv3in7u parent: timour@askmonty.org-20130611081135-rge7p00h8e9nhypj fixes bug: https://mariadb.atlassian.net/browse/MDEV-4648 committer: timour@askmonty.org branch nick: 10.0-md83 timestamp: Fri 2013-08-09 14:30:13 +0300 message: Fix bug MDEV-4648 SQ pushdown: Wrong result (missing rows) with materialization+semijoin, IN and ALL subqueries, UNION (part of MDEV-83)
Analysis:
The cause of the wrong result was that the ALL subquery was incorrectly attached to the last table in the join plan
. The ALL subquery was transformed into a MIN expression, however it still depended on OUTER_REF_TABLE_BIT as if it was a subquery. The reason for this dependence was that the transformed MIN expression referred to the Item_cache object of the left subquery operand created for the initial Item_in_optimizer. Solution:
When transforming an ALL subquery into a MIN/MAX expression, use the actual left argument expression, instead of the Item_cache created for the subquery.
OK to push. Thank you!
participants (1)
-
Oleksandr Byelkin