summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <thek@adventure.(none)>2007-05-07 10:29:08 +0200
committerunknown <thek@adventure.(none)>2007-05-07 10:29:08 +0200
commitcdca13e9c553ce42587b41d7aa188bab7d3268e9 (patch)
tree6f0f2633d790bad28c45b239f4e32d0511986b0b /sql
parent1513cd0933f73356fb9461c343ef8b2c39c1e0a0 (diff)
parentd3693efe8a89029c7b4bf404e4182850d4f7f4c4 (diff)
downloadmariadb-git-cdca13e9c553ce42587b41d7aa188bab7d3268e9.tar.gz
Merge adventure.(none):/home/thek/Development/cpp/bug26977/my51-bug26977
into adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime
Diffstat (limited to 'sql')
-rw-r--r--sql/sp_head.cc16
-rw-r--r--sql/sp_head.h6
2 files changed, 19 insertions, 3 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 89fcd80abcf..320595bd723 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -3047,10 +3047,20 @@ sp_instr_hreturn::print(String *str)
uint
sp_instr_hreturn::opt_mark(sp_head *sp, List<sp_instr> *leads)
{
- if (m_dest)
- return sp_instr_jump::opt_mark(sp, leads);
-
marked= 1;
+
+ if (m_dest)
+ {
+ /*
+ This is an EXIT handler; next instruction step is in m_dest.
+ */
+ return m_dest;
+ }
+
+ /*
+ This is a CONTINUE handler; next instruction step will come from
+ the handler stack and not from opt_mark.
+ */
return UINT_MAX;
}
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 51ca529bed0..8ebba314ec5 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -992,6 +992,12 @@ public:
virtual void print(String *str);
+ /* This instruction will not be short cut optimized. */
+ virtual uint opt_shortcut_jump(sp_head *sp, sp_instr *start)
+ {
+ return m_ip;
+ }
+
virtual uint opt_mark(sp_head *sp, List<sp_instr> *leads);
private: