diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2005-07-01 13:01:46 +0400 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2005-07-01 13:01:46 +0400 |
commit | 0f64a495068bc8898c7269b495c76cb28624b50d (patch) | |
tree | f780b41399823750ea4737fc932dfa4c34d0319c /sql/sp_head.h | |
parent | 17bd4e9f6a0c72aa9e7d10894edb6e8f97afb794 (diff) | |
download | mariadb-git-0f64a495068bc8898c7269b495c76cb28624b50d.tar.gz |
"Fix" for bug #11394 "Recursion in SP crash server" and bug #11600
"Stored procedures: crash with function calling itself".
Disallow recursive stored routines until we either make Item's and LEX
reentrant safe or will use spearate sp_head instances (and thus separate
LEX objects and Item trees) for each routine invocation.
mysql-test/r/sp-error.result:
Added tests for bug #11394 "Recursion in SP crash server" and
bug #11600 "Stored procedures: crash with function calling itself".
(We simply disallow recursion for stored routines).
mysql-test/r/sp.result:
Disabled test cases containing recursive stored routines until we will
support for them.
mysql-test/t/sp-error.test:
Added tests for bug #11394 "Recursion in SP crash server" and
bug #11600 "Stored procedures: crash with function calling itself".
(We simply disallow recursion for stored routines).
mysql-test/t/sp.test:
Disabled test cases containing recursive stored routines until we will
support for them.
sql/share/errmsg.txt:
Added error message saying that recursive stored routines are disallowed.
sql/sp_head.cc:
sp_head::execute():
Since many Item's and LEX members can't be used in reentrant fashion
we have to disable recursion for stored routines. So let us track
routine invocations using sp_head::m_is_invoked member and raise
error when one attempts to call routine recursively.
sql/sp_head.h:
sp_head:
Added m_is_invoked member for tracking of routine invocations and
preventing recursion.
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r-- | sql/sp_head.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h index aaef5a3d50e..39b0c1394fe 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -259,6 +259,9 @@ private: */ HASH m_sptabs; + /* Used for tracking of routine invocations and preventing recursion. */ + bool m_is_invoked; + int execute(THD *thd); |