diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2005-03-05 16:31:58 +0300 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2005-03-05 16:31:58 +0300 |
commit | e3bc9d82e6c58aea14aa1106adc6c609a5026b89 (patch) | |
tree | c5edb86c94bf138a7049952573b7f5752324da7a /sql/sp.cc | |
parent | f76b64f540fe7ee2505f14d8cd0c19aac0cead44 (diff) | |
download | mariadb-git-e3bc9d82e6c58aea14aa1106adc6c609a5026b89.tar.gz |
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.
sql/sp.cc:
We do not need to call sp_head::restore_lex() explicitly to restore right
value of THD::lex in case when we have encountered error during parsing.
Now we do this in sp_head::~sp_head() instead.
sql/sp_head.cc:
sp_head::destroy():
Fixed cleaning up of stack of auxilary LEXes.
We also restore right value of THD::lex during this process now.
sql/sql_parse.cc:
We do not need to call sp_head::restore_lex() explicitly to restore right
value of THD::lex in case when we have encountered error during parsing.
Now we do this in sp_head::~sp_head() instead.
sql/sql_prepare.cc:
We do not need to call sp_head::restore_lex() explicitly to restore right
value of THD::lex in case when we have encountered error during parsing.
Now we do this in sp_head::~sp_head() instead.
sql/sql_trigger.cc:
We do not need to call sp_head::restore_lex() explicitly to restore right
value of THD::lex in case when we have encountered error during parsing.
Now we do this in sp_head::~sp_head() instead.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r-- | sql/sp.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index 8b8e8897180..3f6d4d0bf1b 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -307,8 +307,6 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp) goto done; if (sp) { - if (oldlex != newlex) - sp->restore_lex(thd); delete sp; newlex->sphead= NULL; } |