summaryrefslogtreecommitdiff
path: root/sql/sp_head.cc
diff options
context:
space:
mode:
authorRamil Kalimullin <ramil@mysql.com>2009-03-25 23:41:16 +0400
committerRamil Kalimullin <ramil@mysql.com>2009-03-25 23:41:16 +0400
commitaca1a83fedd916492c97f77557d27c79ae54da43 (patch)
tree7aa34f58ecccff62834f2f5bd96104233a64261f /sql/sp_head.cc
parent4f5f7f353ac4783fae7aa0bff891d1325177cc82 (diff)
parenteccad3f252e0263249eee45d3d76987d4fc0d4e2 (diff)
downloadmariadb-git-aca1a83fedd916492c97f77557d27c79ae54da43.tar.gz
Manual 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 ef6cb556f4c..fcf51aac1b5 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -956,6 +956,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++)
{
@@ -989,6 +991,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)
@@ -2853,6 +2857,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;
if (!thd->is_error())
thd->main_da.reset_diagnostics_area();