diff options
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 55f6fc04442..167de5ae3a6 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -862,7 +862,8 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, Query_arena *arena, backup; TABLE_LIST *top_view= table->top_table(); int res; - bool result; + bool result, view_is_mergeable; + TABLE_LIST *view_main_select_tables; DBUG_ENTER("mysql_make_view"); DBUG_PRINT("info", ("table: 0x%lx (%s)", (ulong) table, table->table_name)); @@ -1095,9 +1096,8 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, */ if (lex->binlog_row_based_if_mixed) old_lex->binlog_row_based_if_mixed= TRUE; - bool view_is_mergeable= (table->algorithm != VIEW_ALGORITHM_TMPTABLE && - lex->can_be_merged()); - TABLE_LIST *view_main_select_tables; + view_is_mergeable= (table->algorithm != VIEW_ALGORITHM_TMPTABLE && + lex->can_be_merged()); LINT_INIT(view_main_select_tables); if (view_is_mergeable) @@ -1144,7 +1144,6 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, /* Prepare a security context to check underlying objects of the view */ - Security_context *save_security_ctx= thd->security_ctx; if (!(table->view_sctx= (Security_context *) thd->stmt_arena->alloc(sizeof(Security_context)))) goto err; |