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

Function push_new_name_resolution_context

sql/sql_parse.cc:1828–1845  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1826*/
1827
1828bool
1829push_new_name_resolution_context(THD *thd,
1830 TABLE_LIST *left_op, TABLE_LIST *right_op)
1831{
1832 Name_resolution_context *on_context;
1833 if (!(on_context= new (thd->mem_root) Name_resolution_context))
1834 return TRUE;
1835 on_context->init();
1836 on_context->first_name_resolution_table=
1837 left_op->first_leaf_for_name_resolution();
1838 on_context->last_name_resolution_table=
1839 right_op->last_leaf_for_name_resolution();
1840 on_context->select_lex= thd->lex->current_select;
1841 // Save join nest's context in right_op, to find it later in view merging.
1842 DBUG_ASSERT(right_op->context_of_embedding == NULL);
1843 right_op->context_of_embedding= on_context;
1844 return thd->lex->push_context(on_context);
1845}
1846
1847
1848/**

Callers

nothing calls this directly

Calls 4

initMethod · 0.45
push_contextMethod · 0.45

Tested by

no test coverage detected