mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Recursion support made for SP (BUG#10100).
client/mysqltest.c: An expected error messages hiding from the log if disable_result_log is in force. mysql-test/r/sp-dynamic.result: The test expanded for case of allowed/disalowed recursion. mysql-test/r/sp-error.result: Error messages changed. Test of bug11394() made with allowed recursion. mysql-test/r/sp.result: Tests for recursion. mysql-test/r/trigger.result: Check that triggers are not affected by this patch. mysql-test/r/variables.result: Test of max_sp_recursion_depth variable. mysql-test/t/sp-dynamic.test: The test expanded for case of allowed/disalowed recursion. mysql-test/t/sp-error.test: Error messages changed. Test of bug11394() made with allowed recursion. mysql-test/t/sp.test: Tests for recursion. mysql-test/t/trigger.test: Check that triggers are not affected by this patch. mysql-test/t/variables.test: Test of max_sp_recursion_depth variable. sql/item_func.cc: sp_find_function() and sp_find_procedure() joined to sp_find_routine() function as it was mentioned in TODO. sql/mysqld.cc: max_sp_recursion_depth variable added. sql/set_var.cc: max_sp_recursion_depth variable added. sql/share/errmsg.txt: An error message changed. An error message added. sql/sp.cc: sp_find_function() and sp_find_procedure() joined to sp_find_routine() function as it was mentioned in TODO. Temory LEX is allocated on a stack, not on a heap. Recursion support added for stored procedures. sql/sp.h: sp_find_function() and sp_find_procedure() joined to sp_find_routine() function as it was mentioned in TODO. sql/sp_head.cc: Initialization of new sp_head fields to get correct list of instances contained one instance only. Stack requirement for SP instruction is increased. Stack free space is checked before mem root initialisation to avoid memory leak. Pointer to the free instance management added before and after SP execution. sql/sp_head.h: New sp_head variables added to support inst of instances of SP for recursion and pointer on ths first free to use instance. sql/sql_base.cc: open_table() consume a lot of stack space so we check free stack space before it. sql/sql_class.h: max_sp_recursion_depth variable added. sql/sql_parse.cc: sp_find_function() and sp_find_procedure() joined to sp_find_routine() function as it was mentioned in TODO.
This commit is contained in:
@ -351,6 +351,14 @@ set global rpl_recovery_rank=100;
|
||||
set global server_id=100;
|
||||
set global slow_launch_time=100;
|
||||
set sort_buffer_size=100;
|
||||
set @@max_sp_recursion_depth=10;
|
||||
select @@max_sp_recursion_depth;
|
||||
@@max_sp_recursion_depth
|
||||
10
|
||||
set @@max_sp_recursion_depth=0;
|
||||
select @@max_sp_recursion_depth;
|
||||
@@max_sp_recursion_depth
|
||||
0
|
||||
set sql_auto_is_null=1;
|
||||
select @@sql_auto_is_null;
|
||||
@@sql_auto_is_null
|
||||
|
Reference in New Issue
Block a user