Commit 78ddd9ff authored by unknown's avatar unknown

MWL#89: Cost-based choice between Materialization and IN->EXISTS transformation

Step1 in the separation of the creation of IN->EXISTS equi-join conditions from
their injection. The goal of this separation is to make it possible that the
IN->EXISTS conditions can be used for cost estimation without actually modifying
the subquery.

This patch separates single_value_in_to_exists_transformer() into two methods:
- create_single_value_in_to_exists_cond(), and
- inject_single_value_in_to_exists_cond()
The patch performs minimal refactoring of the code so that it is easier to solve
problems resulting from the separation. There is a lot to be simplified in this
code, but this will be done separately.
parent 0d35bddf
This diff is collapsed.
......@@ -425,8 +425,18 @@ class Item_in_subselect :public Item_exists_subselect
trans_res select_in_like_transformer(JOIN *join, Comp_creator *func);
trans_res single_value_transformer(JOIN *join, Comp_creator *func);
trans_res row_value_transformer(JOIN * join);
trans_res single_value_in_to_exists_transformer(JOIN * join,
Comp_creator *func);
trans_res create_single_value_in_to_exists_cond(JOIN * join,
Comp_creator *func,
Item **where_term,
Item **having_term);
trans_res inject_single_value_in_to_exists_cond(JOIN * join,
Comp_creator *func,
Item *where_term,
Item *having_term);
trans_res row_value_in_to_exists_transformer(JOIN * join);
virtual bool exec();
longlong val_int();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment