MCPcopy Create free account
hub / github.com/MariaDB/server / attach_selects_chain

Method attach_selects_chain

sql/sql_lex.cc:6565–6586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6563}
6564
6565SELECT_LEX_UNIT *
6566SELECT_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
6588SELECT_LEX *
6589LEX::wrap_unit_into_derived(SELECT_LEX_UNIT *unit)

Callers 1

Calls 5

alloc_unitMethod · 0.80
register_select_chainMethod · 0.80
next_selectMethod · 0.80
reset_distinctMethod · 0.80
add_fake_select_lexMethod · 0.80

Tested by

no test coverage detected