summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorkaren.langford@oracle.com <>2012-03-20 17:35:41 +0100
committerhery.ramilison@oracle.com <>2012-03-20 17:35:41 +0100
commit3adb401c8ab9e69c3ff118e4be9bae32c2fcc4be (patch)
tree925e0ff35f68fda77f571324df1d8a2f6f65e880 /sql/sp_head.cc
parentd4ed7cf411194f502d63be34abf0fd541a69241a (diff)
parent3aa13d8ca123f3a900acce00ae113ff7660373a7 (diff)
downloadmariadb-git-3adb401c8ab9e69c3ff118e4be9bae32c2fcc4be.tar.gz
Merge from mysql-5.1.62-release
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 db9142e47f5..7eef9f5ab28 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -3356,6 +3356,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;
}