• Alexander Barkov's avatar
    This patch is a cleanup simplifying upcoming · c9629daa
    Alexander Barkov authored
    "MDEV-8909 union parser cleanup" changes.
    
    When the server parses a query like
      SELECT * FROM (SELECT 1);
    a sequence of calls
      st_select_lex::init_nested_join() ..
      st_select_lex::end_nested_join()
    was performed two times (tested in gdb).
    Both pairs of calls seem to be redundant for a query
    like this, because there are actually no any joins here.
    
    This patch moved "table_ref_select" inside "select_derived",
    which revealed that one the pairs was definitely redundant:
    After this transformation we got an init_nested_join()
    immediately followed by end_nested_join() for the same st_select_lex,
    which has no any sense. So this pair of calls was removed.
    c9629daa
sql_yacc.yy 510 KB