summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authorunknown <pem@mysql.comhem.se>2004-09-10 11:11:52 +0200
committerunknown <pem@mysql.comhem.se>2004-09-10 11:11:52 +0200
commit1912148cec19f4a20eddae9d0143124909872173 (patch)
tree177a307bee403859b893521b666bfd245cbef01f /sql/sp_head.h
parent862e78568e43272002dea1a12ff62e3d097be558 (diff)
downloadmariadb-git-1912148cec19f4a20eddae9d0143124909872173.tar.gz
Fixed BUG#3294: Stored procedure crash if table dropped before use.
Dropping the table was not the real problem, the problem was with errors occuring within error handlers. mysql-test/r/sp-error.result: New test case for BUG#3294. mysql-test/t/sp-error.test: New test case for BUG#3294. sql/sp_head.cc: Use hreturn instruction both for continue and exit handlers (a special case of a jump). sql/sp_head.h: Use hreturn instruction both for continue and exit handlers (a special case of a jump). sql/sp_rcontext.cc: Keep track on if we're in a handler already, for error handling. sql/sp_rcontext.h: Keep track on if we're in a handler already, for error handling. sql/sql_yacc.yy: Use hreturn instruction both for continue and exit handlers (a special case of a jump).
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r--sql/sp_head.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h
index f4ed3760b94..9c308961aa4 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -677,7 +677,7 @@ private:
}; // class sp_instr_hpop : public sp_instr
-class sp_instr_hreturn : public sp_instr
+class sp_instr_hreturn : public sp_instr_jump
{
sp_instr_hreturn(const sp_instr_hreturn &); /* Prevent use of these */
void operator=(sp_instr_hreturn &);
@@ -685,7 +685,7 @@ class sp_instr_hreturn : public sp_instr
public:
sp_instr_hreturn(uint ip, sp_pcontext *ctx, uint fp)
- : sp_instr(ip, ctx), m_frame(fp)
+ : sp_instr_jump(ip, ctx), m_frame(fp)
{}
virtual ~sp_instr_hreturn()
@@ -695,11 +695,7 @@ public:
virtual void print(String *str);
- virtual uint opt_mark(sp_head *sp)
- {
- marked= 1;
- return UINT_MAX;
- }
+ virtual uint opt_mark(sp_head *sp);
private: