SELECT x, ...
FROM ( SELECT y, ... FROM ... ) AS a
JOIN tbl ON tbl.x = a.y
WHERE ...
This will evaluate the subquery into a temp table, then JOIN that to tbl.
Prior to 5.6, there could not be an index on the temp table. So, this was potentially very inefficient:
SELECT ...
...