diff options
author | unknown <evgen@sunlight.local> | 2006-08-09 01:45:42 +0400 |
---|---|---|
committer | unknown <evgen@sunlight.local> | 2006-08-09 01:45:42 +0400 |
commit | a5ccdea7726529a1f8ecb122b1db0994c60d4d35 (patch) | |
tree | 1053c123d06d4746f4dad2444e1dd54819753143 /sql/sql_view.cc | |
parent | 55bd10965a62d1984bed8c967f6b463c39c68540 (diff) | |
parent | 962d5b4d4e1d90acc3b9a7ba9a8d345b36bc33df (diff) | |
download | mariadb-git-a5ccdea7726529a1f8ecb122b1db0994c60d4d35.tar.gz |
Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into sunlight.local:/local_work/leak_fix
sql/sql_view.cc:
Auto merged
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index a987b9e7028..8c4f188a840 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -185,7 +185,8 @@ fill_defined_view_parts (THD *thd, TABLE_LIST *view) if (view->view) free_view= 0; memcpy (&decoy, view, sizeof (TABLE_LIST)); - if ((decoy.table= open_table(thd, &decoy, thd->mem_root, NULL, 0))) + if (!open_table(thd, &decoy, thd->mem_root, ¬_used, OPEN_VIEW_NO_PARSE) && + !decoy.view) { /* It's a table */ my_free((gptr)decoy.table, MYF(0)); @@ -830,13 +831,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; @@ -927,6 +929,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 |