-
Evgeny Potemkin authored
In a subselect all fields from outer selects are marked as dependent on selects they are belong to. In some cases optimizer substitutes it for an equivalent expression. For example "a_field IN (SELECT outer_field)" is substituted with "a_field = outer_field". As we moved the outer_field to the upper select it's not really outer anymore. But it was left marked as outer. If exists an index over a_field optimizer choose wrong execution plan and thus return wrong result. Now the Item_in_subselect::single_value_transformer function removes dependent marking from fields when a subselect is optimized away.
af2c91b7