mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
Fixed BUG#6022: Stored procedure shutdown problem with self-calling function.
Fixed the pre-caching of functions. It now gives the expected stack overrun error for functions recursing too deep. mysql-test/r/sp.result: New test case for BUG#6022. mysql-test/t/sp.test: New test case for BUG#6022. sql/sp.cc: Cache function first, then recurse, or the pre-caching loops infinitely for recursive functions.
This commit is contained in:
parent
d73b379cd1
commit
d925bcd8d6
3 changed files with 33 additions and 1 deletions
|
|
@ -990,12 +990,12 @@ sp_cache_functions(THD *thd, LEX *lex)
|
|||
if (db_find_routine(thd, TYPE_ENUM_FUNCTION, &name, &sp)
|
||||
== SP_OK)
|
||||
{
|
||||
sp_cache_insert(&thd->sp_func_cache, sp);
|
||||
ret= sp_cache_functions(thd, newlex);
|
||||
delete newlex;
|
||||
thd->lex= oldlex;
|
||||
if (ret)
|
||||
break;
|
||||
sp_cache_insert(&thd->sp_func_cache, sp);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue