diff options
author | pem@mysql.com <> | 2005-09-26 18:46:31 +0200 |
---|---|---|
committer | pem@mysql.com <> | 2005-09-26 18:46:31 +0200 |
commit | 6a84506af777a19fbe730cae322d387b28e331f4 (patch) | |
tree | f82078b116d6f50b1f6b9d1fcc5a7dc39b684176 /sql/sp_rcontext.cc | |
parent | 6ac4c47f7be331733559455ae963921f28ec7f8a (diff) | |
download | mariadb-git-6a84506af777a19fbe730cae322d387b28e331f4.tar.gz |
Fixed BUG#7049: Stored procedure CALL errors are ignored
Search the chain of sp_rcontexts recursively for handlers. If one is found,
it will be detected in the sp_head::execute() method at the corresponding
level.
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r-- | sql/sp_rcontext.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index 252bd7e5cab..ccb38358049 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -29,9 +29,9 @@ #include "sp_rcontext.h" #include "sp_pcontext.h" -sp_rcontext::sp_rcontext(uint fsize, uint hmax, uint cmax) +sp_rcontext::sp_rcontext(sp_rcontext *prev, uint fsize, uint hmax, uint cmax) : m_count(0), m_fsize(fsize), m_result(NULL), m_hcount(0), m_hsp(0), - m_ihsp(0), m_hfound(-1), m_ccount(0) + m_ihsp(0), m_hfound(-1), m_ccount(0), m_prev_ctx(prev) { m_frame= (Item **)sql_alloc(fsize * sizeof(Item*)); m_handler= (sp_handler_t *)sql_alloc(hmax * sizeof(sp_handler_t)); @@ -116,7 +116,11 @@ sp_rcontext::find_handler(uint sql_errno, } } if (found < 0) + { + if (m_prev_ctx) + return m_prev_ctx->find_handler(sql_errno, level); return FALSE; + } m_hfound= found; return TRUE; } |