MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / end_nested_join

Method end_nested_join

sql/sql_parse.cc:1596–1622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1594*/
1595
1596TABLE_LIST *st_select_lex::end_nested_join(THD *thd)
1597{
1598 TABLE_LIST *ptr;
1599 NESTED_JOIN *nested_join;
1600 DBUG_ENTER("end_nested_join");
1601
1602 DBUG_ASSERT(embedding);
1603 ptr= embedding;
1604 join_list= ptr->join_list;
1605 embedding= ptr->embedding;
1606 nested_join= ptr->nested_join;
1607 if (nested_join->join_list.elements == 1)
1608 {
1609 TABLE_LIST *embedded= nested_join->join_list.head();
1610 join_list->pop();
1611 embedded->join_list= join_list;
1612 embedded->embedding= embedding;
1613 join_list->push_front(embedded);
1614 ptr= embedded;
1615 }
1616 else if (nested_join->join_list.elements == 0)
1617 {
1618 join_list->pop();
1619 ptr= 0; // return value
1620 }
1621 DBUG_RETURN(ptr);
1622}
1623
1624
1625/**

Callers

nothing calls this directly

Calls 3

headMethod · 0.45
popMethod · 0.45
push_frontMethod · 0.45

Tested by

no test coverage detected