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

Method create_priority_nest

sql/sql_lex.cc:6751–6776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6749
6750
6751SELECT_LEX *LEX::create_priority_nest(SELECT_LEX *first_in_nest, SELECT_LEX *attach_to)
6752{
6753 DBUG_ENTER("LEX::create_priority_nest");
6754 DBUG_ASSERT(first_in_nest->first_nested);
6755 enum sub_select_type wr_unit_type= first_in_nest->get_linkage();
6756 bool wr_distinct= first_in_nest->distinct;
6757 if (attach_to)
6758 attach_to->cut_next();
6759 SELECT_LEX *wrapper= wrap_select_chain_into_derived(first_in_nest);
6760 if (wrapper)
6761 {
6762 first_in_nest->first_nested= NULL;
6763 wrapper->set_linkage_and_distinct(wr_unit_type, wr_distinct);
6764 if (attach_to)
6765 {
6766 wrapper->first_nested= attach_to->first_nested;
6767 wrapper->set_master_unit(attach_to->master_unit());
6768 attach_to->link_neighbour(wrapper);
6769 }
6770 else
6771 {
6772 wrapper->first_nested= wrapper;
6773 }
6774 }
6775 DBUG_RETURN(wrapper);
6776}
6777
6778
6779/**

Callers

nothing calls this directly

Calls 6

get_linkageMethod · 0.80
cut_nextMethod · 0.80
set_master_unitMethod · 0.80
master_unitMethod · 0.80
link_neighbourMethod · 0.80

Tested by

no test coverage detected