1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

sql_base.cc, unireg.h, sql_lex.h, table.cc, sql_view.h, sql_view.cc:

Correct memory leak fix


sql/unireg.h:
  Correct memory leak fix
sql/table.cc:
  Correct memory leak fix
sql/sql_view.h:
  Correct memory leak fix
sql/sql_view.cc:
  Correct memory leak fix
sql/sql_lex.h:
  Correct memory leak fix
sql/sql_base.cc:
  Correct memory leak fix
This commit is contained in:
unknown
2006-08-09 00:05:42 +04:00
parent c8673b09b8
commit 1e9ebd010a
6 changed files with 46 additions and 19 deletions

View File

@@ -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, &not_used, 0) &&
if (!open_table(thd, &decoy, thd->mem_root, &not_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