1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -5083,8 +5083,6 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
{
if (thd->lex->sphead)
{
if (lex != thd->lex)
thd->lex->sphead->restore_lex(thd);
delete thd->lex->sphead;
thd->lex->sphead= NULL;
}
@ -5120,8 +5118,6 @@ void mysql_parse(THD *thd, char *inBuf, uint length)
if (thd->lex->sphead)
{
/* Clean up after failed stored procedure/function */
if (lex != thd->lex)
thd->lex->sphead->restore_lex(thd);
delete thd->lex->sphead;
thd->lex->sphead= NULL;
}