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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user