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

Method parsed_select_expr_cont

sql/sql_lex.cc:11671–11709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11669
11670
11671SELECT_LEX_UNIT *LEX::parsed_select_expr_cont(SELECT_LEX_UNIT *unit,
11672 SELECT_LEX *s2,
11673 enum sub_select_type unit_type,
11674 bool distinct, bool oracle)
11675{
11676 DBUG_ASSERT(!s2->next_select());
11677 SELECT_LEX *sel1= s2;
11678 SELECT_LEX *last= unit->pre_last_parse->next_select();
11679
11680 int cmp= oracle? 0 : cmp_unit_op(unit_type, last->get_linkage());
11681 if (cmp == 0)
11682 {
11683 sel1->first_nested= last->first_nested;
11684 }
11685 else if (cmp > 0)
11686 {
11687 last->first_nested= unit->pre_last_parse;
11688 sel1->first_nested= last;
11689 }
11690 else /* cmp < 0 */
11691 {
11692 SELECT_LEX *first_in_nest= last->first_nested;
11693 if (first_in_nest->first_nested != first_in_nest)
11694 {
11695 /* There is a priority jump starting from first_in_nest */
11696 if ((last= create_priority_nest(first_in_nest,
11697 first_in_nest->first_nested)) == NULL)
11698 return NULL;
11699 unit->fix_distinct();
11700 }
11701 sel1->first_nested= last->first_nested;
11702 }
11703 last->link_neighbour(sel1);
11704 sel1->set_master_unit(unit);
11705 unit->uncacheable|= sel1->uncacheable;
11706 sel1->set_linkage_and_distinct(unit_type, distinct);
11707 unit->pre_last_parse= last;
11708 return unit;
11709}
11710
11711
11712/**

Callers

nothing calls this directly

Calls 7

cmp_unit_opFunction · 0.85
next_selectMethod · 0.80
get_linkageMethod · 0.80
fix_distinctMethod · 0.80
link_neighbourMethod · 0.80
set_master_unitMethod · 0.80

Tested by

no test coverage detected