summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authormonty@mysql.com/narttu.mysql.fi <>2007-01-22 14:04:40 +0200
committermonty@mysql.com/narttu.mysql.fi <>2007-01-22 14:04:40 +0200
commita04157fbb3f2b2e054c02968ffc82bb0eb971d58 (patch)
treedb1cb9732cc2b568c4a56c3f6d11cf8f4d5250b6 /sql/sql_view.cc
parent205f7a0583f5ba5cc0c6428fa6e44c74b534d8e8 (diff)
parent9d3fda77c8e20ff299f9750b64c42dfbb58a7806 (diff)
downloadmariadb-git-a04157fbb3f2b2e054c02968ffc82bb0eb971d58.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index 0d6c38ee50e..9582bc607f6 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -861,7 +861,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));
@@ -1088,9 +1089,10 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
table->next_global= view_tables;
}
- 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)
{
/*
@@ -1135,7 +1137,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;