summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authorpem@mysql.comhem.se <>2004-04-05 17:01:19 +0200
committerpem@mysql.comhem.se <>2004-04-05 17:01:19 +0200
commit95dcdde134c93a0d183b9d8cf09d3d3f7fa08eb5 (patch)
treecf7e76c8e635cc495116540f20458ac279c1cfd3 /sql/sp_head.h
parentda44d1155315df98326c1c44af2b00eb66bc4e43 (diff)
downloadmariadb-git-95dcdde134c93a0d183b9d8cf09d3d3f7fa08eb5.tar.gz
Fixed BUG#3287: Stored procedure handler scope outside of begin/end.
Backpatching overwrote already backpatched instructions, which made it skip the hpop instruction; possibly not only a problem for handlers, but this is one known case when it happened.
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r--sql/sp_head.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 19d1cb8254a..3aebd80d686 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -351,7 +351,7 @@ class sp_instr_jump : public sp_instr
public:
sp_instr_jump(uint ip)
- : sp_instr(ip)
+ : sp_instr(ip), m_dest(0)
{}
sp_instr_jump(uint ip, uint dest)
@@ -368,7 +368,8 @@ public:
virtual void
set_destination(uint dest)
{
- m_dest= dest;
+ if (m_dest == 0) // Don't reset
+ m_dest= dest;
}
protected: