| 54 | |
| 55 | |
| 56 | void Item_subselect::init(st_select_lex *select_lex, |
| 57 | select_result_interceptor *result) |
| 58 | { |
| 59 | /* |
| 60 | Please see Item_singlerow_subselect::invalidate_and_restore_select_lex(), |
| 61 | which depends on alterations to the parse tree implemented here. |
| 62 | */ |
| 63 | |
| 64 | DBUG_ENTER("Item_subselect::init"); |
| 65 | DBUG_PRINT("enter", ("select_lex: 0x%lx", (long) select_lex)); |
| 66 | unit= select_lex->master_unit(); |
| 67 | |
| 68 | if (unit->item) |
| 69 | { |
| 70 | parsing_place= unit->item->parsing_place; |
| 71 | unit->item= this; |
| 72 | } |
| 73 | else |
| 74 | { |
| 75 | SELECT_LEX *outer_select= unit->outer_select(); |
| 76 | /* |
| 77 | do not take into account expression inside aggregate functions because |
| 78 | they can access original table fields |
| 79 | */ |
| 80 | parsing_place= (outer_select->in_sum_expr ? |
| 81 | NO_MATTER : |
| 82 | outer_select->parsing_place); |
| 83 | } |
| 84 | { |
| 85 | SELECT_LEX *upper= unit->outer_select(); |
| 86 | if (upper->parsing_place == IN_HAVING) |
| 87 | upper->subquery_in_having= 1; |
| 88 | } |
| 89 | DBUG_VOID_RETURN; |
| 90 | } |
| 91 | |
| 92 | Item_subselect::~Item_subselect() |
| 93 | { |
nothing calls this directly
no test coverage detected