Commit 7b91cd9a authored by unknown's avatar unknown
Browse files

table.cc:

  remove unneeded multitable_view assignment
sql_view.cc:
  fix potential memorry overrun in ref_array
  asssign multitable_view in time of view creation (BUG#12569)


sql/sql_view.cc:
  fix potential memorry overrun in ref_array
  asssign multitable_view in time of view creation
sql/table.cc:
  remove unneeded multitable_view assignment
parent 6ff38ce7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -844,6 +844,9 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
                                                         view_tables);
      lex->select_lex.context.outer_context= 0;
      lex->select_lex.context.select_lex= table->select_lex;
      lex->select_lex.select_n_having_items+=
        table->select_lex->select_n_having_items;

      /* do not check privileges & hide errors for view underlyings */
      for (SELECT_LEX *sl= lex->all_selects_list;
           sl;
@@ -864,7 +867,11 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)

      {
        if (view_tables->next_local)
        {
          table->multitable_view= TRUE;
          if (table->belong_to_view)
           table->belong_to_view->multitable_view= TRUE;
        }
        /* make nested join structure for view tables */
        NESTED_JOIN *nested_join;
        if (!(nested_join= table->nested_join=
+0 −2
Original line number Diff line number Diff line
@@ -1720,8 +1720,6 @@ void st_table_list::set_ancestor()
        */
        tbl->ancestor->set_ancestor();
      }
      if (tbl->multitable_view)
        multitable_view= TRUE;
    } while ((tbl= tbl->next_local));

    if (!multitable_view)