-
unknown authored
When a view statement is compiled on CREATE VIEW time, most of the optimizations should not be done. Finding the right optimization for a subquery is one of them. Unfortunately the optimizer is resolving the column references of the left expression of IN subqueries in the process of deciding witch optimization to use (if needed). So there should be a special case in Item_in_subselect::fix_fields() : check the validity of the left expression of IN subqueries in CREATE VIEW mode and then proceed as normal. mysql-test/r/subselect.result: test case mysql-test/r/view.result: chnaged explain due to column being resolved mysql-test/t/subselect.test: test case sql/item_subselect.cc: overloaded fix_fields to fix the left_expr in prepare_view_mode sql/item_subselect.h: fix_fields overloaded so it can prepare left_expr
aeaaa456