diff options
author | pem@mysql.comhem.se <> | 2004-09-10 11:11:52 +0200 |
---|---|---|
committer | pem@mysql.comhem.se <> | 2004-09-10 11:11:52 +0200 |
commit | 624cf0e53718cab0a8985e0b877d4853372b59e6 (patch) | |
tree | 177a307bee403859b893521b666bfd245cbef01f /sql/sp_rcontext.cc | |
parent | 7c8213ea20a54b9c1b08dad45b9ab0289ff3796a (diff) | |
download | mariadb-git-624cf0e53718cab0a8985e0b877d4853372b59e6.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.
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r-- | sql/sp_rcontext.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index 7fa44f217f6..1bdd022470b 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -32,6 +32,7 @@ sp_rcontext::sp_rcontext(uint fsize, uint hmax, uint cmax) : m_count(0), m_fsize(fsize), m_result(NULL), m_hcount(0), m_hsp(0), m_hfound(-1), m_ccount(0) { + in_handler= FALSE; m_frame= (Item **)sql_alloc(fsize * sizeof(Item*)); m_outs= (int *)sql_alloc(fsize * sizeof(int)); m_handler= (sp_handler_t *)sql_alloc(hmax * sizeof(sp_handler_t)); @@ -58,6 +59,8 @@ sp_rcontext::set_item_eval(uint idx, Item *i, enum_field_types type) int sp_rcontext::find_handler(uint sql_errno) { + if (in_handler) + return 0; // Already executing a handler if (m_hfound >= 0) return 1; // Already got one |