diff options
author | evgen@sunlight.local <> | 2006-08-09 00:05:42 +0400 |
---|---|---|
committer | evgen@sunlight.local <> | 2006-08-09 00:05:42 +0400 |
commit | 1250b06ac910e66f3d3a06d3ed7fcc9172e7e5a7 (patch) | |
tree | ab30eaf93e4f7a9c072d16c535283e96bca6260e /sql/sql_view.cc | |
parent | 8944564fd8cfcddadd74bc6b6608e19fd04f3b55 (diff) | |
download | mariadb-git-1250b06ac910e66f3d3a06d3ed7fcc9172e7e5a7.tar.gz |
sql_base.cc, unireg.h, sql_lex.h, table.cc, sql_view.h, sql_view.cc:
Correct memory leak fix
Diffstat (limited to 'sql/sql_view.cc')
-rw-r--r-- | sql/sql_view.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 8aa93a7bbeb..b402e7e0936 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -183,7 +183,7 @@ 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, ¬_used, 0) && + if (!open_table(thd, &decoy, thd->mem_root, ¬_used, OPEN_VIEW_NO_PARSE) && !decoy.view) { return TRUE; @@ -815,13 +815,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; @@ -912,6 +913,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 |