diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-06-06 17:51:28 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-06-06 17:51:28 +0200 |
commit | 4749d40c635634e25e07d28ce1a04e9263bcc375 (patch) | |
tree | c5bb3287675cd8676d76c8ee42ef2d79cc599e25 /sql/sp_head.cc | |
parent | 1ff1cb10fc236010b5969058cab934c2b306c931 (diff) | |
parent | 33ef993773449cb3917665b188f6b6575d399bd0 (diff) | |
download | mariadb-git-4749d40c635634e25e07d28ce1a04e9263bcc375.tar.gz |
5.5 merge
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index f0a87673857..3a761897e90 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -1161,8 +1161,9 @@ find_handler_after_execution(THD *thd, sp_rcontext *ctx) MYSQL_ERROR *err; while ((err= it++)) { - if (err->get_level() != MYSQL_ERROR::WARN_LEVEL_WARN && - err->get_level() != MYSQL_ERROR::WARN_LEVEL_NOTE) + if ((err->get_level() != MYSQL_ERROR::WARN_LEVEL_WARN && + err->get_level() != MYSQL_ERROR::WARN_LEVEL_NOTE) || + err->handled()) continue; if (ctx->find_handler(thd, @@ -1171,6 +1172,7 @@ find_handler_after_execution(THD *thd, sp_rcontext *ctx) err->get_level(), err->get_message_text())) { + err->mark_handled(); break; } } @@ -1420,6 +1422,7 @@ sp_head::execute(THD *thd, bool merge_da_on_success) Will write this SP statement into binlog separately. TODO: consider changing the condition to "not inside event union". */ + MEM_ROOT *user_var_events_alloc_saved= thd->user_var_events_alloc; if (thd->locked_tables_mode <= LTM_LOCK_TABLES) thd->user_var_events_alloc= thd->mem_root; @@ -1435,7 +1438,7 @@ sp_head::execute(THD *thd, bool merge_da_on_success) if (thd->locked_tables_mode <= LTM_LOCK_TABLES) { reset_dynamic(&thd->user_var_events); - thd->user_var_events_alloc= NULL;//DEBUG + thd->user_var_events_alloc= user_var_events_alloc_saved; } /* we should cleanup free_list and memroot, used by instruction */ |