| 6563 | } |
| 6564 | |
| 6565 | SELECT_LEX_UNIT * |
| 6566 | SELECT_LEX::attach_selects_chain(SELECT_LEX *first_sel, |
| 6567 | Name_resolution_context *context) |
| 6568 | { |
| 6569 | SELECT_LEX_UNIT *unit; |
| 6570 | DBUG_ENTER("SELECT_LEX::attach_select_chain"); |
| 6571 | |
| 6572 | if (!(unit= parent_lex->alloc_unit())) |
| 6573 | DBUG_RETURN(NULL); |
| 6574 | |
| 6575 | unit->register_select_chain(first_sel); |
| 6576 | register_unit(unit, context); |
| 6577 | if (first_sel->next_select()) |
| 6578 | { |
| 6579 | unit->reset_distinct(); |
| 6580 | DBUG_ASSERT(!unit->fake_select_lex); |
| 6581 | if (unit->add_fake_select_lex(parent_lex->thd)) |
| 6582 | DBUG_RETURN(NULL); |
| 6583 | } |
| 6584 | |
| 6585 | DBUG_RETURN(unit); |
| 6586 | } |
| 6587 | |
| 6588 | SELECT_LEX * |
| 6589 | LEX::wrap_unit_into_derived(SELECT_LEX_UNIT *unit) |
no test coverage detected