diff options
Diffstat (limited to 'sql/sp_pcontext.cc')
-rw-r--r-- | sql/sp_pcontext.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc index 4d3cf80cd34..3973f05b74b 100644 --- a/sql/sp_pcontext.cc +++ b/sql/sp_pcontext.cc @@ -56,13 +56,10 @@ sp_pcontext::find_pvar(LEX_STRING *name) while (i-- > 0) { sp_pvar_t *p= find_pvar(i); - uint len= (p->name.length > name->length ? - p->name.length : name->length); - if (my_strncasecmp(system_charset_info, - name->str, - p->name.str, - len) == 0) + if (my_strnncoll(system_charset_info, + (const uchar *)name->str, name->length, + (const uchar *)p->name.str, p->name.length) == 0) { return p; } |