| 1826 | */ |
| 1827 | |
| 1828 | bool |
| 1829 | push_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 | /** |
nothing calls this directly
no test coverage detected