diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-04-05 10:49:38 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-04-05 10:49:38 +0200 |
commit | d4b30a7a84742ae03774fe25af2cbad144ba2d5d (patch) | |
tree | d65a66f9f2f9378a1f4ca014e18952ae514f4cb1 /sql/sp_head.cc | |
parent | d993ce1bbf8413a0aaf5a524a11334359234c5f4 (diff) | |
parent | cea2c5d28ead6ae4191aea164df9b80b41a743ad (diff) | |
download | mariadb-git-mariadb-5.1.62.tar.gz |
mysql-5.1.62 mergemariadb-5.1.62
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 67ec830d902..932d0d052e8 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -3355,6 +3355,23 @@ sp_instr_hpush_jump::opt_mark(sp_head *sp, List<sp_instr> *leads) m_optdest= sp->get_instr(m_dest); } sp->add_mark_lead(m_dest, leads); + + /* + For continue handlers, all instructions in the scope of the handler + are possible leads. For example, the instruction after freturn might + be executed if the freturn triggers the condition handled by the + continue handler. + + m_dest marks the start of the handler scope. It's added as a lead + above, so we start on m_dest+1 here. + m_opt_hpop is the hpop marking the end of the handler scope. + */ + if (m_type == SP_HANDLER_CONTINUE) + { + for (uint scope_ip= m_dest+1; scope_ip <= m_opt_hpop; scope_ip++) + sp->add_mark_lead(scope_ip, leads); + } + return m_ip+1; } |