summaryrefslogtreecommitdiff
path: root/sql/sql_view.cc
diff options
context:
space:
mode:
authorrburnett@bk-internal.mysql.com <>2006-08-09 18:02:06 +0200
committerrburnett@bk-internal.mysql.com <>2006-08-09 18:02:06 +0200
commit39ab7b0ab75caf1b4666dc439a97ec442f83458b (patch)
tree88ee3cb850f7d0fe22d79cdc55b198b2a359f899 /sql/sql_view.cc
parent1be93531ee5e5b7e3b4adaf6305572712d020b49 (diff)
parent6691c623100134d666b142f5752fcc022bdd1ac9 (diff)
downloadmariadb-git-39ab7b0ab75caf1b4666dc439a97ec442f83458b.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
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