summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorJoerg Bruehe <joerg.bruehe@oracle.com>2012-03-20 22:27:49 +0100
committerJoerg Bruehe <joerg.bruehe@oracle.com>2012-03-20 22:27:49 +0100
commit747fbf8f8b46e6321819dc17c806a6f577111da4 (patch)
tree090ea3ae9b50973297879fb1882004bcd4ea5c6c /sql/sp_head.cc
parent7f4d66d4cff50cb8fd89551eb58930289e6fadd4 (diff)
parentbfaebe3f5e4b917c4498e234bad7a9d45d07ca62 (diff)
downloadmariadb-git-747fbf8f8b46e6321819dc17c806a6f577111da4.tar.gz
Merge the 5.5.22 release build into main 5.5,
conflict in "sql/filesort.cc" solved manually.
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 0c228d19f4d..09795156102 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -3559,6 +3559,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;
}