Note: It might belong to Timour, because the problem appeared with revno 3445 (MDEV-193), but since it requires semijoin, assigning to Sergei for starters. Please re-assign if needed.
Also reproducible on revno 3445. Not reproducible on revno 3444.
Reproducible with MyISAM, Aria, InnoDB.