From a9086bc75cbd676eb065ca660edab222df0b097e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Dec 2005 14:30:42 +0100 Subject: Post-review fixes for BUG#14376: MySQL crash on scoped variable (re)initialization sql/sp_pcontext.cc: Count boundary for variable visibility from the frame end instead. sql/sp_pcontext.h: Count boundary for variable visibility from the frame end instead. Updated comments. sql/sql_yacc.yy: Changed tabs to spaces. --- sql/sp_pcontext.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sql/sp_pcontext.cc') diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc index cca3e03d69c..f5ad7e31b43 100644 --- a/sql/sp_pcontext.cc +++ b/sql/sp_pcontext.cc @@ -150,7 +150,7 @@ sp_pcontext::diff_cursors(sp_pcontext *ctx) sp_pvar_t * sp_pcontext::find_pvar(LEX_STRING *name, my_bool scoped) { - uint i= m_pboundary; + uint i= m_pvar.elements - m_pboundary; while (i--) { @@ -186,7 +186,6 @@ sp_pcontext::push_pvar(LEX_STRING *name, enum enum_field_types type, p->offset= current_pvars(); p->dflt= NULL; insert_dynamic(&m_pvar, (gptr)&p); - m_pboundary= m_pvar.elements; } } -- cgit v1.2.1