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

sp_head now has its own mem_root (WL#961).

Also fixed some difficult memory leaks that became apparent
in this task.


sql/sp.cc:
  sp_head now has its own mem_root.
sql/sp_head.cc:
  sp_head now has its own mem_root.
  Also fixed some difficult memory leaks.
sql/sp_head.h:
  sp_head now has its own mem_root.
sql/sql_lex.h:
  Fixed some memory leaks in sp_head. Need to keep track on used lex:es.
sql/sql_parse.cc:
  sp_head now has its own mem_root.
  Fixed SP memory leaks.
sql/sql_prepare.cc:
  Fixed SP memory leaks.
sql/sql_yacc.yy:
  sp_head now has its own mem_root.
This commit is contained in:
unknown
2003-06-29 18:15:17 +02:00
parent e42120c664
commit 663ac86f6c
7 changed files with 155 additions and 36 deletions

View File

@ -762,8 +762,16 @@ static bool parse_prepare_query(PREP_STMT *stmt,
thd->lex->param_count= 0;
if (!yyparse((void *)thd) && !thd->is_fatal_error)
error= send_prepare_results(stmt);
if (thd->lex->sphead && lex != thd->lex)
thd->lex->sphead->restore_lex(thd);
else
{
if (thd->lex->sphead)
{
if (lex != thd->lex)
thd->lex->sphead->restore_lex(thd);
delete thd->lex->sphead;
thd->lex->sphead= NULL;
}
}
lex_end(lex);
DBUG_RETURN(error);
}