Commit 349da1d6 authored by Alexander Barkov's avatar Alexander Barkov

sql_yacc.yy: Removing unnecessary init_nested_join() and end_nested_join()

from select_derived_init.
parent c44b2e66
...@@ -11247,32 +11247,18 @@ get_select_lex_derived: ...@@ -11247,32 +11247,18 @@ get_select_lex_derived:
; ;
select_derived_init: select_derived_init:
get_select_lex
{ {
LEX *lex= Lex; LEX *lex= Lex;
if ($1->init_nested_join(lex->thd))
MYSQL_YYABORT;
if (! lex->parsing_options.allows_derived) if (! lex->parsing_options.allows_derived)
{ {
my_error(ER_VIEW_SELECT_DERIVED, MYF(0)); my_error(ER_VIEW_SELECT_DERIVED, MYF(0));
MYSQL_YYABORT; MYSQL_YYABORT;
} }
SELECT_LEX *sel= lex->current_select; TABLE_LIST *embedding= lex->current_select->embedding;
TABLE_LIST *embedding;
if (!sel->embedding || sel->end_nested_join(lex->thd))
{
/* we are not in parentheses */
my_parse_error(thd, ER_SYNTAX_ERROR);
MYSQL_YYABORT;
}
embedding= Select->embedding;
$$= embedding && $$= embedding &&
!embedding->nested_join->join_list.elements; !embedding->nested_join->join_list.elements;
/* return true if we are deeply nested */ /* return true if we are deeply nested */
// Now we have the same st_select_lex that we had in the beginning
DBUG_ASSERT($1 == Lex->current_select);
} }
; ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment