summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorHe Zhenxing <zhenxing.he@sun.com>2009-04-08 16:17:26 +0800
committerHe Zhenxing <zhenxing.he@sun.com>2009-04-08 16:17:26 +0800
commit16641a882048f7bec779d786798771609c9d57dc (patch)
tree690e34ec8eb6f78c27c0bc0a15937b7c14e7d56f /sql/sp_head.cc
parent51a91166387760546d563ebf72bfa037fcff24a8 (diff)
parent10350e2097393cb7410eedfcf6ba533faba20a56 (diff)
downloadmariadb-git-16641a882048f7bec779d786798771609c9d57dc.tar.gz
Auto merge
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r--sql/sp_head.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 7da52458f26..e20c3b361c0 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -894,6 +894,8 @@ subst_spvars(THD *thd, sp_instr *instr, LEX_STRING *query_str)
qbuf.length(0);
cur= query_str->str;
prev_pos= res= 0;
+ thd->query_name_consts= 0;
+
for (Item_splocal **splocal= sp_vars_uses.front();
splocal < sp_vars_uses.back(); splocal++)
{
@@ -927,6 +929,8 @@ subst_spvars(THD *thd, sp_instr *instr, LEX_STRING *query_str)
res|= qbuf.append(')');
if (res)
break;
+
+ thd->query_name_consts++;
}
res|= qbuf.append(cur + prev_pos, query_str->length - prev_pos);
if (res)
@@ -2622,6 +2626,7 @@ sp_instr_stmt::execute(THD *thd, uint *nextp)
*nextp= m_ip+1;
thd->query= query;
thd->query_length= query_length;
+ thd->query_name_consts= 0;
}
DBUG_RETURN(res);
}