| 11588 | */ |
| 11589 | |
| 11590 | Item *LEX::create_item_query_expression(THD *thd, |
| 11591 | st_select_lex_unit *unit) |
| 11592 | { |
| 11593 | if (clause_that_disallows_subselect) |
| 11594 | { |
| 11595 | my_error(ER_SUBQUERIES_NOT_SUPPORTED, MYF(0), |
| 11596 | clause_that_disallows_subselect); |
| 11597 | return NULL; |
| 11598 | } |
| 11599 | |
| 11600 | // Add the subtree of subquery to the current SELECT_LEX |
| 11601 | SELECT_LEX *curr_sel= select_stack_head(); |
| 11602 | DBUG_ASSERT(current_select == curr_sel || |
| 11603 | (curr_sel == NULL && current_select == &builtin_select)); |
| 11604 | if (!curr_sel) |
| 11605 | { |
| 11606 | curr_sel= &builtin_select; |
| 11607 | curr_sel->register_unit(unit, &curr_sel->context); |
| 11608 | curr_sel->add_statistics(unit); |
| 11609 | } |
| 11610 | |
| 11611 | return new (thd->mem_root) |
| 11612 | Item_singlerow_subselect(thd, unit->first_select()); |
| 11613 | } |
| 11614 | |
| 11615 | |
| 11616 | SELECT_LEX_UNIT *LEX::parsed_select_expr_start(SELECT_LEX *s1, SELECT_LEX *s2, |
nothing calls this directly
no test coverage detected