summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/item_cmpfunc.cc8
-rw-r--r--sql/sql_string.cc23
-rw-r--r--sql/sql_string.h4
3 files changed, 4 insertions, 31 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 744ed1bceca..74eb5734ecf 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1313,10 +1313,10 @@ longlong Item_func_like::val_int()
set_charset(my_charset_bin);
if (canDoTurboBM)
return turboBM_matches(res->ptr(), res->length()) ? 1 : 0;
- if (binary())
- return wild_compare(*res,*res2,escape) ? 0 : 1;
- else
- return wild_case_compare(*res,*res2,escape) ? 0 : 1;
+ return my_wildcmp(charset(),
+ res->ptr(),res->ptr()+res->length(),
+ res2->ptr(),res2->ptr()+res2->length(),
+ escape,wild_one,wild_many) ? 0 : 1;
}
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index e43ff1b3215..5083fb13105 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -673,26 +673,3 @@ String *copy_if_not_alloced(String *to,String *from,uint32 from_length)
-int wild_case_compare(String &match,String &wild, char escape)
-{
- DBUG_ENTER("wild_case_compare");
- DBUG_PRINT("enter",("match='%s', wild='%s', escape='%c'"
- ,match.ptr(),wild.ptr(),escape));
- DBUG_RETURN(my_wildcmp(match.str_charset,match.ptr(),match.ptr()+match.length(),
- wild.ptr(), wild.ptr()+wild.length(),
- escape,wild_one,wild_many));
-}
-
-
-
-int wild_compare(String &match,String &wild, char escape)
-{
- DBUG_ENTER("wild_compare");
- DBUG_PRINT("enter",("match='%s', wild='%s', escape='%c'"
- ,match.ptr(),wild.ptr(),escape));
- DBUG_RETURN(my_wildcmp(my_charset_bin,match.ptr(),match.ptr()+match.length(),
- wild.ptr(), wild.ptr()+wild.length(),
- escape,wild_one,wild_many));
-}
-
-
diff --git a/sql/sql_string.h b/sql/sql_string.h
index d9dce95e0a2..42f9e446981 100644
--- a/sql/sql_string.h
+++ b/sql/sql_string.h
@@ -28,8 +28,6 @@ class String;
int sortcmp(const String *a,const String *b);
int stringcmp(const String *a,const String *b);
String *copy_if_not_alloced(String *a,String *b,uint32 arg_length);
-int wild_case_compare(String &match,String &wild,char escape);
-int wild_compare(String &match,String &wild,char escape);
class String
{
@@ -208,8 +206,6 @@ public:
friend int sortcmp(const String *a,const String *b);
friend int stringcmp(const String *a,const String *b);
friend String *copy_if_not_alloced(String *a,String *b,uint32 arg_length);
- friend int wild_case_compare(String &match,String &wild,char escape);
- friend int wild_compare(String &match,String &wild,char escape);
uint32 numchars();
int charpos(int i,uint32 offset=0);