summaryrefslogtreecommitdiff
path: root/sql/sp_rcontext.h
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2005-09-26 18:46:31 +0200
committerunknown <pem@mysql.com>2005-09-26 18:46:31 +0200
commita5925a90e24cfb793d69629d41aafd3472157470 (patch)
treef82078b116d6f50b1f6b9d1fcc5a7dc39b684176 /sql/sp_rcontext.h
parentad8ff14165ed656aee697b49eac6c7e8cb5a5c00 (diff)
downloadmariadb-git-a5925a90e24cfb793d69629d41aafd3472157470.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. mysql-test/r/sp.result: New test case for BUG#7049. Note that the spurious warnings in the BUG#12379 test now are gone (as expected). mysql-test/t/sp.test: New test case for BUG#7049. sql/sp_head.cc: Link sp_rcontexts to allow catching errors across invokation boundaries. (Also fixed print method for the hreturn instruction.) sql/sp_rcontext.cc: Link sp_rcontexts to allow catching errors across invokation boundaries. If a handler is not found in the current sp_rcontext, recurse into the previous ones (if any). sql/sp_rcontext.h: Link sp_rcontexts to allow catching errors across invokation boundaries.
Diffstat (limited to 'sql/sp_rcontext.h')
-rw-r--r--sql/sp_rcontext.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h
index 22fa4f6e865..c7a298eccc0 100644
--- a/sql/sp_rcontext.h
+++ b/sql/sp_rcontext.h
@@ -66,7 +66,7 @@ class sp_rcontext : public Sql_alloc
*/
Query_arena *callers_arena;
- sp_rcontext(uint fsize, uint hmax, uint cmax);
+ sp_rcontext(sp_rcontext *prev, uint fsize, uint hmax, uint cmax);
~sp_rcontext()
{
@@ -226,6 +226,8 @@ private:
sp_cursor **m_cstack;
uint m_ccount;
+ sp_rcontext *m_prev_ctx; // Previous context (NULL if none)
+
}; // class sp_rcontext : public Sql_alloc