1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

After merge fixes

Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root
(Before one had to change thd->mem_root ; push_back(); restore mem_root.
This commit is contained in:
monty@mysql.com
2004-11-09 03:58:44 +02:00
parent 1087186657
commit 2bba55b57f
19 changed files with 91 additions and 101 deletions

View File

@ -434,7 +434,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
DBUG_RETURN(-1);
}
if (!(parser= sql_parse_prepare(&path, &thd->mem_root, 0)))
if (!(parser= sql_parse_prepare(&path, thd->mem_root, 0)))
DBUG_RETURN(1);
if (!parser->ok() ||
@ -451,7 +451,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view,
TODO: read dependence list, too, to process cascade/restrict
TODO: special cascade/restrict procedure for alter?
*/
if (parser->parse((gptr)view, &thd->mem_root,
if (parser->parse((gptr)view, thd->mem_root,
view_parameters + revision_number_position, 1))
{
DBUG_RETURN(thd->net.report_error? -1 : 0);
@ -565,7 +565,7 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
TODO: when VIEWs will be stored in cache, table mem_root should
be used here
*/
if (parser->parse((gptr)table, &thd->mem_root, view_parameters,
if (parser->parse((gptr)table, thd->mem_root, view_parameters,
required_view_parameters))
goto err;
@ -586,7 +586,7 @@ mysql_make_view(File_parser *parser, TABLE_LIST *table)
now Lex placed in statement memory
*/
table->view= lex= thd->lex= (LEX*) new(&thd->mem_root) st_lex_local;
table->view= lex= thd->lex= (LEX*) new(thd->mem_root) st_lex_local;
lex_start(thd, (uchar*)table->query.str, table->query.length);
lex->select_lex.select_number= ++thd->select_number;
old_lex->derived_tables|= DERIVED_VIEW;