diff options
author | unknown <serg@serg.mylan> | 2003-10-21 11:58:43 +0200 |
---|---|---|
committer | unknown <serg@serg.mylan> | 2003-10-21 11:58:43 +0200 |
commit | eaf1b192a65477317d54438bb9b3c69de1370e2e (patch) | |
tree | 8d1d6d06c790efe700899d57a87e63e8d91764f4 /strings/ctype-bin.c | |
parent | c63e573399e53a23172a6a50fdcbe80c41da7d1d (diff) | |
parent | 3c2e50d772d0ed25dea73da277d84818dc151dd5 (diff) | |
download | mariadb-git-eaf1b192a65477317d54438bb9b3c69de1370e2e.tar.gz |
merged
BitKeeper/etc/ignore:
auto-union
include/m_ctype.h:
Auto merged
mysql-test/r/mysqldump.result:
Auto merged
sql/field.cc:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_test.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
strings/ctype-simple.c:
Auto merged
Diffstat (limited to 'strings/ctype-bin.c')
-rw-r--r-- | strings/ctype-bin.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index ebf915398a8..5a785552b45 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -118,6 +118,12 @@ static int my_strcasecmp_bin(CHARSET_INFO * cs __attribute__((unused)), return strcmp(s,t); } +int my_mbcharlen_8bit(CHARSET_INFO *cs __attribute__((unused)), + uint c __attribute__((unused))) +{ + return 1; +} + static int my_mb_wc_bin(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *wc, const unsigned char *str, @@ -264,12 +270,12 @@ static int my_strnxfrm_bin(CHARSET_INFO *cs __attribute__((unused)), static uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)), - const char *b, uint b_length, - const char *s, uint s_length, - my_match_t *match, uint nmatch) + const char *b, uint b_length, + const char *s, uint s_length, + my_match_t *match, uint nmatch) { register const uchar *str, *search, *end, *search_end; - + if (s_length <= b_length) { if (!s_length) @@ -282,32 +288,32 @@ uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)), } return 1; /* Empty string is always found */ } - + str= (const uchar*) b; search= (const uchar*) s; end= (const uchar*) b+b_length-s_length+1; search_end= (const uchar*) s + s_length; - + skipp: while (str != end) { if ( (*str++) == (*search)) { register const uchar *i,*j; - - i= str; + + i= str; j= search+1; - + while (j != search_end) if ((*i++) != (*j++)) goto skipp; - + if (nmatch > 0) { match[0].beg= 0; match[0].end= str- (const uchar*)b-1; match[0].mblen= match[0].end; - + if (nmatch > 1) { match[1].beg= match[0].end; @@ -338,7 +344,7 @@ MY_COLLATION_HANDLER my_collation_8bit_bin_handler = static MY_CHARSET_HANDLER my_charset_handler= { NULL, /* ismbchar */ - NULL, /* mbcharlen */ + my_mbcharlen_8bit, /* mbcharlen */ my_numchars_8bit, my_charpos_8bit, my_lengthsp_8bit, |