1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Merge sunlight.local:/home/evgen/bk-trees/mysql-5.0

into  sunlight.local:/local_work/leak_fix
This commit is contained in:
evgen@sunlight.local
2006-08-09 01:43:11 +04:00
6 changed files with 47 additions and 19 deletions

View File

@@ -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, &not_used, OPEN_VIEW_NO_PARSE) &&
!decoy.view)
{
/* It's a table */
my_free((gptr)decoy.table, MYF(0));
@@ -827,13 +828,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;
@@ -924,6 +926,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