summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/sql_string.cc34
-rw-r--r--sql/sql_string.h1
2 files changed, 0 insertions, 35 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index b60aee2b5df..991fb4d5c5a 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -570,40 +570,6 @@ skip:
}
/*
- Search after a string without regarding to case
- This needs to be replaced when we have character sets per string
-*/
-
-int String::strstr_case(const String &s,uint32 offset)
-{
- if (s.length()+offset <= str_length)
- {
- if (!s.length())
- return ((int) offset); // Empty string is always found
-
- register const char *str = Ptr+offset;
- register const char *search=s.ptr();
- const char *end=Ptr+str_length-s.length()+1;
- const char *search_end=s.ptr()+s.length();
-skip:
- while (str != end)
- {
- if (str_charset->sort_order[*str++] == str_charset->sort_order[*search])
- {
- register char *i,*j;
- i=(char*) str; j=(char*) search+1;
- while (j != search_end)
- if (str_charset->sort_order[*i++] !=
- str_charset->sort_order[*j++])
- goto skip;
- return (int) (str-Ptr) -1;
- }
- }
- }
- return -1;
-}
-
-/*
** Search string from end. Offset is offset to the end of string
*/
diff --git a/sql/sql_string.h b/sql/sql_string.h
index d559218bcb9..01329c45a98 100644
--- a/sql/sql_string.h
+++ b/sql/sql_string.h
@@ -197,7 +197,6 @@ public:
bool append_with_prefill(const char *s, uint32 arg_length,
uint32 full_length, char fill_char);
int strstr(const String &search,uint32 offset=0); // Returns offset to substring or -1
- int strstr_case(const String &s,uint32 offset=0);
int strrstr(const String &search,uint32 offset=0); // Returns offset to substring or -1
bool replace(uint32 offset,uint32 arg_length,const char *to,uint32 length);
bool replace(uint32 offset,uint32 arg_length,const String &to);