summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
authorDmitry Shulga <Dmitry.Shulga@Sun.COM>2010-10-21 15:41:13 +0700
committerDmitry Shulga <Dmitry.Shulga@Sun.COM>2010-10-21 15:41:13 +0700
commit3d9cddabf828ae1a070d621db3414f6c409ac21b (patch)
tree0c9772ec45e046e8dc88c8cd6eb0372223cff4cc /sql/sp.cc
parent5ea471bde5c4c19891c68c7164dd3d9759ccc001 (diff)
downloadmariadb-git-3d9cddabf828ae1a070d621db3414f6c409ac21b.tar.gz
Fixed bug#45445 - cannot execute procedures with thread_stack
set to 128k.
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 87eb40c29ac..7385a6ffcae 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -779,6 +779,9 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
int ret= 0;
+ if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&ret))
+ return TRUE;
+
thd->lex= &newlex;
newlex.current_select= NULL;
@@ -1505,6 +1508,9 @@ sp_find_routine(THD *thd, int type, sp_name *name, sp_cache **cp,
(int) name->m_name.length, name->m_name.str,
type, cache_only));
+ if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&depth))
+ return NULL;
+
if ((sp= sp_cache_lookup(cp, name)))
{
ulong level;