summaryrefslogtreecommitdiff
path: root/sql/sp_head.h
diff options
context:
space:
mode:
authormalff@lambda.hsd1.co.comcast.net. <>2008-01-23 13:26:41 -0700
committermalff@lambda.hsd1.co.comcast.net. <>2008-01-23 13:26:41 -0700
commitc3ad0cac751943ab7d8918b95688ffa87244acf6 (patch)
treefe23ef00f598a60c172f4f220f65dfc072babbb2 /sql/sp_head.h
parent4bb503568dc598d1e16fead04c9cebc4e78725df (diff)
downloadmariadb-git-c3ad0cac751943ab7d8918b95688ffa87244acf6.tar.gz
Bug#33618 (Crash in sp_rcontext)
Bug 33983 (Stored Procedures: wrong end <label> syntax is accepted) The server used to crash when REPEAT or another control instruction was used in conjunction with labels and a LEAVE instruction. The crash was caused by a missing "pop" of handlers or cursors in the code representing the stored program. When executing the code in a loop, this missing "pop" would result in a stack overflow, corrupting memory. Code generation has been fixed to produce the missing h_pop/c_pop instructions. Also, the logic checking that labels at the beginning and the end of a statement are matched was incorrect, causing Bug 33983. End labels, when used, must match the label used at the beginning of a block.
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 a46ec9433d7..0e710196603 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -779,8 +779,9 @@ public:
virtual void backpatch(uint dest, sp_pcontext *dst_ctx)
{
- if (m_dest == 0) // Don't reset
- m_dest= dest;
+ /* Calling backpatch twice is a logic flaw in jump resolution. */
+ DBUG_ASSERT(m_dest == 0);
+ m_dest= dest;
}
/*