summaryrefslogtreecommitdiff
path: root/sql/sp_pcontext.cc
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2005-11-01 15:03:41 +0100
committerunknown <pem@mysql.com>2005-11-01 15:03:41 +0100
commitce68c1cb1dcfa6fa4b269d6eedf2d13b5fdac56a (patch)
tree7154dfbd2783f06db2587a7d73fd7eef907ae685 /sql/sp_pcontext.cc
parentf9dbcd558a52652692c4593c93656431e4cbf043 (diff)
parent2c4c542ba2a82d42d3109f5257d0323e99bb321d (diff)
downloadmariadb-git-ce68c1cb1dcfa6fa4b269d6eedf2d13b5fdac56a.tar.gz
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/usr/home/pem/bug14376/mysql-5.0
Diffstat (limited to 'sql/sp_pcontext.cc')
-rw-r--r--sql/sp_pcontext.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc
index f873b676925..cca3e03d69c 100644
--- a/sql/sp_pcontext.cc
+++ b/sql/sp_pcontext.cc
@@ -52,7 +52,7 @@ sp_cond_check(LEX_STRING *sqlstate)
sp_pcontext::sp_pcontext(sp_pcontext *prev)
: Sql_alloc(), m_psubsize(0), m_csubsize(0), m_hsubsize(0),
- m_handlers(0), m_parent(prev)
+ m_handlers(0), m_parent(prev), m_pboundary(0)
{
VOID(my_init_dynamic_array(&m_pvar, sizeof(sp_pvar_t *), 16, 8));
VOID(my_init_dynamic_array(&m_cond, sizeof(sp_cond_type_t *), 16, 8));
@@ -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_pvar.elements;
+ uint i= m_pboundary;
while (i--)
{
@@ -186,6 +186,7 @@ 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;
}
}