summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index 2d7e38b47bd..9e0d848b19d 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -306,7 +306,11 @@ sp_add_fun_to_lex(LEX *lex, LEX_STRING fun)
while ((fn= li++))
{
- if (my_strncasecmp(system_charset_info, fn, fun.str, fun.length) == 0)
+ uint len= strlen(fn);
+
+ if (my_strnncoll(system_charset_info,
+ (const uchar *)fn, len,
+ (const uchar *)fun.str, fun.length) == 0)
break;
}
if (! fn)
@@ -389,7 +393,12 @@ sp_find_cached_function(THD *thd, char *name, uint namelen)
while ((sp= li++))
{
- if (my_strncasecmp(system_charset_info, name, sp->name(), namelen) == 0)
+ uint len;
+ const uchar *n= (const uchar *)sp->name(&len);
+
+ if (my_strnncoll(system_charset_info,
+ (const uchar *)name, namelen,
+ n, len) == 0)
break;
}
return sp;