1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for yet another memleak caused by SP-locking patch.

Improved handling of situations when we encounter error during
CREATE PROCEDURE (FUNCTION/TRIGGER/...) and bail out of yyparse()
without restoring proper THD::lex.
This commit is contained in:
dlenev@brandersnatch.localdomain
2005-03-05 16:31:58 +03:00
parent c24820834a
commit e6a506c397
5 changed files with 14 additions and 12 deletions

View File

@ -415,9 +415,8 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
*/
if (lex.sphead)
{
if (&lex != thd->lex)
thd->lex->sphead->restore_lex(thd);
delete lex.sphead;
lex.sphead= 0;
}
goto err_with_lex_cleanup;
}