summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-04-05 23:07:18 +0200
committerSergei Golubchik <sergii@pisem.net>2012-04-05 23:07:18 +0200
commita3073ecd96a829aaff87c6386e0766fc1440922b (patch)
treed91e26efc46ab64ee6cb8de880eac060cded0213 /sql/sp_head.cc
parent1a48919036a7746a15ff6bd19cb52c25fc6a57c1 (diff)
parentcbd52a42ee9b93675e5cdaa043df878c423b6571 (diff)
downloadmariadb-git-a3073ecd96a829aaff87c6386e0766fc1440922b.tar.gz
merge
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index b30347a5ca7..89073847b6a 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -3352,6 +3352,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;
}