Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
The following query returns extra rows when executed in maria 5.3 with semijoin=off. If the query is executed with semijoin=on, or if it is executed on 5.2 or with the subquery manually inlined, no rows are returned.
SELECT table2 .`col_date_key`
FROM BB table1 JOIN ( C table2 JOIN CC table3 ON table3 .`col_varchar_key` = table2 .`col_varchar_nokey` )
ON table3 .`col_varchar_key` = table2 .`col_varchar_key`
WHERE table1 .`col_varchar_nokey` IN (
SELECT `col_varchar_nokey`
FROM C ) ;
The EXPLAIN plan does not specify what optimization strategy was chosen instead of semijoin.