summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorunknown <rburnett@bk-internal.mysql.com>2006-08-09 18:02:06 +0200
committerunknown <rburnett@bk-internal.mysql.com>2006-08-09 18:02:06 +0200
commitc2771dbe03d1336870fd4703c31333c5c6df5b8d (patch)
tree88ee3cb850f7d0fe22d79cdc55b198b2a359f899 /sql/sql_view.cc
parent9672ef612e9d3362e6b9d6b29d77125cea6cc9b3 (diff)
parent4abe4b1717b099dbf3502e041c246b196622a23f (diff)
downloadmariadb-git-c2771dbe03d1336870fd4703c31333c5c6df5b8d.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt sql/sql_view.cc: Auto merged
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r--sql/sql_view.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index db55179f2dc..b4ee542ac39 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -183,11 +183,13 @@ fill_defined_view_parts (THD *thd, TABLE_LIST *view)
TABLE_LIST decoy;
memcpy (&decoy, view, sizeof (TABLE_LIST));
- if (!open_table(thd, &decoy, thd->mem_root, &not_used, 0) &&
+ if (!open_table(thd, &decoy, thd->mem_root, &not_used, OPEN_VIEW_NO_PARSE) &&
!decoy.view)
{
+ /* It's a table */
return TRUE;
}
+
if (!lex->definer)
{
view->definer.host= decoy.definer.host;
@@ -817,13 +819,14 @@ loop_out:
thd Thread handler
parser parser object
table TABLE_LIST structure for filling
-
+ flags flags
RETURN
0 ok
1 error
*/
-bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table)
+bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
+ uint flags)
{
SELECT_LEX *end, *view_select;
LEX *old_lex, *lex;
@@ -914,6 +917,10 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table)
table->db, table->table_name);
get_default_definer(thd, &table->definer);
}
+ if (flags & OPEN_VIEW_NO_PARSE)
+ {
+ DBUG_RETURN(FALSE);
+ }
/*
Save VIEW parameters, which will be wiped out by derived table