-
Ole John Aske authored
This is a problem similar to what was recently fixed in - Bug#26926666 SPJ: 'LOOSESCAN' TABLES SHOULD NOT BE CHILD MEMBERS IN A PUSHED JOIN Furthermore, there also existed a similar 'push limitation' for child tables using the 'FirstMatch' semi join strategy, probably since the first release of the join pushdown feature. After studying all these 3 limitations, we realize that the common denominator for them all, is that a scan-child being part of a semi join 'nest', should not be pushdown joined with a parent table not being within the same semi joined 'nest'. This patch takes advantage if this realization and thus implement a single mechanism covering this pushability limitation for both the existing 'FirstMatch' and 'LooseScan' strategy, as well as the 'Duplicate weedout' being the subject of this bug report. The abstract_query_plan method ::get_join_type() is extended to also identify JT_SEMI_JOIN between a tableand its predecessor. ::is_pushable_as_child() replace its current logic to catch 'FirstMatch' and 'LooseScan' handling with checking for JT_SEMI_JOIN instead, which now will also automagically catch 'Duplicate weedout'. As a side effect a MTR testcase which previously incorrectly rejected 'FirstMatch' pushing of two tables inside the *same* semi join nest is now allowed to be pushed. The 'explain' -> show warnings output is slightly changed as a result of not specifically checking for 'FirstMatch' and 'LooseScan' anymore. Instead 'semi join' is reported as the reject reason.
Ole John Aske authoredThis is a problem similar to what was recently fixed in - Bug#26926666 SPJ: 'LOOSESCAN' TABLES SHOULD NOT BE CHILD MEMBERS IN A PUSHED JOIN Furthermore, there also existed a similar 'push limitation' for child tables using the 'FirstMatch' semi join strategy, probably since the first release of the join pushdown feature. After studying all these 3 limitations, we realize that the common denominator for them all, is that a scan-child being part of a semi join 'nest', should not be pushdown joined with a parent table not being within the same semi joined 'nest'. This patch takes advantage if this realization and thus implement a single mechanism covering this pushability limitation for both the existing 'FirstMatch' and 'LooseScan' strategy, as well as the 'Duplicate weedout' being the subject of this bug report. The abstract_query_plan method ::get_join_type() is extended to also identify JT_SEMI_JOIN between a tableand its predecessor. ::is_pushable_as_child() replace its current logic to catch 'FirstMatch' and 'LooseScan' handling with checking for JT_SEMI_JOIN instead, which now will also automagically catch 'Duplicate weedout'. As a side effect a MTR testcase which previously incorrectly rejected 'FirstMatch' pushing of two tables inside the *same* semi join nest is now allowed to be pushed. The 'explain' -> show warnings output is slightly changed as a result of not specifically checking for 'FirstMatch' and 'LooseScan' anymore. Instead 'semi join' is reported as the reject reason.
Loading