Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
eec581e0
Commit
eec581e0
authored
Oct 07, 2010
by
Dmitry Shulga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug#45445 - cannot execute procedures with thread_stack
set to 128k.
parent
5f911fa8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
mysql-test/collections/default.experimental
mysql-test/collections/default.experimental
+0
-1
sql/sp_head.cc
sql/sp_head.cc
+21
-2
No files found.
mysql-test/collections/default.experimental
View file @
eec581e0
...
...
@@ -29,7 +29,6 @@ rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails spora
rpl.rpl_innodb_bug28430* # Bug#46029
rpl.rpl_innodb_bug30888* @solaris # Bug#47646 2009-09-25 alik rpl.rpl_innodb_bug30888 fails sporadically on Solaris
rpl.rpl_killed_ddl @windows # Bug#47638 2010-01-20 alik The rpl_killed_ddl test fails on Windows
rpl.rpl_row_sp011* @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10
...
...
sql/sp_head.cc
View file @
eec581e0
...
...
@@ -1213,8 +1213,27 @@ sp_head::execute(THD *thd)
Object_creation_ctx
*
saved_creation_ctx
;
Warning_info
*
saved_warning_info
,
warning_info
(
thd
->
warning_info
->
warn_id
());
/* Use some extra margin for possible SP recursion and functions */
if
(
check_stack_overrun
(
thd
,
8
*
STACK_MIN_SIZE
,
(
uchar
*
)
&
old_packet
))
/*
Just reporting a stack overrun error
(@sa check_stack_overrun()) requires stack memory for error
message buffer. Thus, we have to put the below check
relatively close to the beginning of the execution stack,
where available stack margin is still big. As long as the check
has to be fairly high up the call stack, the amount of memory
we "book" for has to stay fairly high as well, and hence
not very accurate. The number below has been calculated
by trial and error, and reflects the amount of memory necessary
to execute a single stored procedure instruction, be it either
an SQL statement, or, heaviest of all, a CALL, which involves
parsing and loading of another stored procedure into the cache
(@sa db_load_routine() and Bug#10100).
At the time of measuring, a recursive SP invocation required
3232 bytes of stack on 32 bit Linux and 6016 bytes on 64 bit Mac.
The same with db_load_routine() required circa 7k bytes and
14k bytes accordingly. Hence, here we book the stack with some
reasonable margin.
*/
if
(
check_stack_overrun
(
thd
,
2
*
STACK_MIN_SIZE
,
(
uchar
*
)
&
old_packet
))
DBUG_RETURN
(
TRUE
);
/* init per-instruction memroot */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment