mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Fix for bug#21416 SP: Recursion level higher than zero needed for non-recursive call
The following procedure was not possible if max_sp_recursion_depth is 0 create procedure show_proc() show create procedure show_proc; Actually there is no recursive call but the limit is checked. Solved by temporarily increasing the thread's limit just before the fetch from cache and decreasing after that. mysql-test/r/sp.result: update result mysql-test/t/sp.test: Test for bug #21416 SP: Recursion level higher than zero needed for non-recursive call sql/sp.cc: Increase the max_sp_recursion_depth temporarily for SHOW CREATE PROCEDURE call. This call is in fact not recursive but is counted as such. Outcome, it will work always but if max_sp_recursion_depth is reached we are going to cache one more sp_head instance.
This commit is contained in:
@ -5387,4 +5387,11 @@ BEGIN
|
||||
RETURN 1;
|
||||
END|
|
||||
ERROR HY000: String '1234567890abcdefghij1234567890abcdefghij1234567890abcdefghijQWERTY' is too long for host name (should be no longer than 60)
|
||||
drop procedure if exists bug21416|
|
||||
create procedure bug21416() show create procedure bug21416|
|
||||
call bug21416()|
|
||||
Procedure sql_mode Create Procedure
|
||||
bug21416 CREATE DEFINER=`root`@`localhost` PROCEDURE `bug21416`()
|
||||
show create procedure bug21416
|
||||
drop procedure bug21416|
|
||||
drop table t1,t2;
|
||||
|
@ -6312,6 +6312,16 @@ BEGIN
|
||||
END|
|
||||
|
||||
|
||||
#
|
||||
# BUG#21416: SP: Recursion level higher than zero needed for non-recursive call
|
||||
#
|
||||
--disable_warnings
|
||||
drop procedure if exists bug21416|
|
||||
--enable_warnings
|
||||
create procedure bug21416() show create procedure bug21416|
|
||||
call bug21416()|
|
||||
drop procedure bug21416|
|
||||
|
||||
#
|
||||
# BUG#NNNN: New bug synopsis
|
||||
#
|
||||
|
Reference in New Issue
Block a user