From 41554da7ff56c3f8ec54929539d0729ea919521d Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Fri, 15 Nov 2002 11:44:23 +0400 Subject: [PATCH] move like_range into CHARSET_INFO structure --- include/m_ctype.h | 20 ++++++--- mysys/charset.c | 1 + sql/opt_range.cc | 95 ++++----------------------------------- strings/ctype-big5.c | 9 ++-- strings/ctype-bin.c | 2 +- strings/ctype-czech.c | 9 ++-- strings/ctype-euc_kr.c | 2 +- strings/ctype-gb2312.c | 2 +- strings/ctype-gbk.c | 9 ++-- strings/ctype-latin1_de.c | 11 +++-- strings/ctype-simple.c | 69 ++++++++++++++++++++++++++++ strings/ctype-sjis.c | 9 ++-- strings/ctype-tis620.c | 9 ++-- strings/ctype-ujis.c | 2 +- strings/ctype-utf8.c | 4 +- strings/ctype-win1250ch.c | 9 ++-- strings/ctype.c | 46 +++++++++---------- 17 files changed, 151 insertions(+), 157 deletions(-) diff --git a/include/m_ctype.h b/include/m_ctype.h index 7aa19d05639..b16db5cde97 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -81,8 +81,11 @@ typedef struct charset_info_st int (*strnxfrm)(struct charset_info_st *, uchar *, uint, const uchar *, uint); my_bool (*like_range)(struct charset_info_st *, - const char *, uint, pchar, uint, - char *, char *, uint *, uint *); + const char *s, uint s_length, + int w_prefix, int w_one, int w_many, + uint res_length, + char *min_str, char *max_str, + uint *min_len, uint *max_len); int (*wildcmp)(struct charset_info_st *, const char *str,const char *str_end, const char *wildstr,const char *wildend, @@ -171,7 +174,14 @@ ulong my_strtoul_8bit(CHARSET_INFO *, const char *s, char **e, int base); longlong my_strtoll_8bit(CHARSET_INFO *, const char *s, char **e, int base); ulonglong my_strtoull_8bit(CHARSET_INFO *, const char *s, char **e, int base); double my_strtod_8bit(CHARSET_INFO *, const char *s, char **e); - + +my_bool my_like_range_simple(CHARSET_INFO *cs, + const char *ptr, uint ptr_length, + int escape, int w_one, int w_many, + uint res_length, + char *min_str, char *max_str, + uint *min_length, uint *max_length); + int my_wildcmp_8bit(CHARSET_INFO *, const char *str,const char *str_end, @@ -230,8 +240,8 @@ int my_wildcmp_mb(CHARSET_INFO *, #define use_strnxfrm(s) ((s)->strnxfrm != NULL) #define my_strnxfrm(s, a, b, c, d) ((s)->strnxfrm((s), (a), (b), (c), (d))) #define my_strnncoll(s, a, b, c, d) ((s)->strnncoll((s), (a), (b), (c), (d))) -#define my_like_range(s, a, b, c, d, e, f, g, h) \ - ((s)->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h))) +#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \ + ((s)->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j))) #define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m))) #define use_mb(s) ((s)->ismbchar != NULL) diff --git a/mysys/charset.c b/mysys/charset.c index e11c319ca28..91bae04046b 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -376,6 +376,7 @@ static CHARSET_INFO *add_charset(CHARSET_INFO *cs, myf flags) sizeof(tmp_sort_order)); memcpy((char*) cs->tab_to_uni, (char*) tmp_to_uni, sizeof(tmp_to_uni)); + cs->like_range = my_like_range_simple; cs->wildcmp = my_wildcmp_8bit; cs->strnncoll = my_strnncoll_simple; cs->caseup_str = my_caseup_str_8bit; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 9a644553f26..13c2f6333b1 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -299,9 +299,6 @@ static SEL_TREE * get_mm_parts(PARAM *param,Field *field, Item_result cmp_type); static SEL_ARG *get_mm_leaf(PARAM *param,Field *field,KEY_PART *key_part, Item_func::Functype type,Item *value); -static bool like_range(const char *ptr,uint length,char wild_prefix, - uint field_length, char *min_str,char *max_str, - char max_sort_char,uint *min_length,uint *max_length); static SEL_TREE *get_mm_tree(PARAM *param,COND *cond); static ha_rows check_quick_select(PARAM *param,uint index,SEL_ARG *key_tree); static ha_rows check_quick_keys(PARAM *param,uint index,SEL_ARG *key_tree, @@ -970,27 +967,14 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part, max_str=min_str+length; if (maybe_null) max_str[0]= min_str[0]=0; - if (field->binary()) - like_error=like_range(res->ptr(),res->length(),wild_prefix,field_length, - min_str+offset,max_str+offset,(char) 255, - &min_length,&max_length); - else - { - CHARSET_INFO *charset=field->charset(); -#ifdef USE_STRCOLL - if (use_strnxfrm(charset)) - like_error= my_like_range(charset, - res->ptr(),res->length(),wild_prefix, - field_length, min_str+maybe_null, - max_str+maybe_null,&min_length,&max_length); - else -#endif - like_error=like_range(res->ptr(),res->length(),wild_prefix, - field_length, - min_str+offset,max_str+offset, - charset->max_sort_char, - &min_length,&max_length); - } + + like_error= my_like_range(field->charset(), + res->ptr(),res->length(), + wild_prefix,wild_one,wild_many, + field_length, + min_str+offset, max_str+offset, + &min_length,&max_length); + if (like_error) // Can't optimize with LIKE DBUG_RETURN(0); if (offset != maybe_null) // Blob @@ -1119,69 +1103,6 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part, } -/* -** Calculate min_str and max_str that ranges a LIKE string. -** Arguments: -** ptr Pointer to LIKE string. -** ptr_length Length of LIKE string. -** escape Escape character in LIKE. (Normally '\'). -** All escape characters should be removed from min_str and max_str -** res_length Length of min_str and max_str. -** min_str Smallest case sensitive string that ranges LIKE. -** Should be space padded to res_length. -** max_str Largest case sensitive string that ranges LIKE. -** Normally padded with the biggest character sort value. -** -** The function should return 0 if ok and 1 if the LIKE string can't be -** optimized ! -*/ - -static bool like_range(const char *ptr,uint ptr_length,char escape, - uint res_length, char *min_str,char *max_str, - char max_sort_chr, uint *min_length, uint *max_length) -{ - const char *end=ptr+ptr_length; - char *min_org=min_str; - char *min_end=min_str+res_length; - - for (; ptr != end && min_str != min_end ; ptr++) - { - if (*ptr == escape && ptr+1 != end) - { - ptr++; // Skip escape - *min_str++= *max_str++ = *ptr; - continue; - } - if (*ptr == wild_one) // '_' in SQL - { - *min_str++='\0'; // This should be min char - *max_str++=max_sort_chr; - continue; - } - if (*ptr == wild_many) // '%' in SQL - { - *min_length= (uint) (min_str - min_org); - *max_length=res_length; - do { - *min_str++ = ' '; // Because if key compression - *max_str++ = max_sort_chr; - } while (min_str != min_end); - return 0; - } - *min_str++= *max_str++ = *ptr; - } - *min_length= *max_length = (uint) (min_str - min_org); - - /* Temporary fix for handling wild_one at end of string (key compression) */ - for (char *tmp= min_str ; tmp > min_org && tmp[-1] == '\0';) - *--tmp=' '; - - while (min_str != min_end) - *min_str++ = *max_str++ = ' '; // Because if key compression - return 0; -} - - /****************************************************************************** ** Tree manipulation functions ** If tree is 0 it means that the condition can't be tested. It refers diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index aae8da72c13..39ddee854ff 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -331,11 +331,10 @@ static int my_strxfrm_big5(uchar * dest, const uchar * src, int len) */ #define max_sort_char ((char) 255) -#define wild_one '_' -#define wild_many '%' static my_bool my_like_range_big5(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,uint ptr_length,pchar escape, + const char *ptr,uint ptr_length, + int escape, int w_one, int w_many, uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { @@ -357,13 +356,13 @@ static my_bool my_like_range_big5(CHARSET_INFO *cs __attribute__((unused)), *min_str++= *max_str++ = *ptr; continue; } - if (*ptr == wild_one) /* '_' in SQL */ + if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++=max_sort_char; continue; } - if (*ptr == wild_many) /* '%' in SQL */ + if (*ptr == w_many) /* '%' in SQL */ { *min_length= (uint) (min_str-min_org); *max_length= res_length; diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index f9f6d60e373..2573ec89660 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -251,7 +251,7 @@ static CHARSET_INFO my_charset_bin_st = 0, /* strxfrm_multiply */ my_strnncoll_binary, /* strnncoll */ NULL, /* strxnfrm */ - NULL, /* like_range */ + my_like_range_simple, /* like_range */ my_wildcmp_bin, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index 4d5479bba0f..ea3cc702abd 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -375,13 +375,12 @@ static int my_strnxfrm_czech(CHARSET_INFO *cs __attribute__((unused)), #define min_sort_char ' ' #define max_sort_char '9' -#define wild_one '_' -#define wild_many '%' #define EXAMPLE static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,uint ptr_length,pchar escape, + const char *ptr,uint ptr_length, + int escape, int w_one, int w_many, uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { @@ -393,9 +392,9 @@ static my_bool my_like_range_czech(CHARSET_INFO *cs __attribute__((unused)), for (; ptr != end && min_str != min_end ; ptr++) { - if (*ptr == wild_one) /* '_' in SQL */ + if (*ptr == w_one) /* '_' in SQL */ { break; } - if (*ptr == wild_many) /* '%' in SQL */ + if (*ptr == w_many) /* '%' in SQL */ { break; } if (*ptr == escape && ptr+1 != end) diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index 4142b2d3941..8a614851fe3 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -8648,7 +8648,7 @@ CHARSET_INFO my_charset_euc_kr = 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ ismbchar_euc_kr, diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index 6a54757ab4c..7a8e9f011a0 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -5698,7 +5698,7 @@ CHARSET_INFO my_charset_gb2312 = 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ ismbchar_gb2312, diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index c7264078d13..504039a4e59 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -2650,11 +2650,10 @@ int my_strnxfrm_gbk(CHARSET_INFO *cs __attribute__((unused)), */ #define max_sort_char ((uchar) 255) -#define wild_one '_' -#define wild_many '%' extern my_bool my_like_range_gbk(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,uint ptr_length,pchar escape, + const char *ptr,uint ptr_length, + int escape, int w_one, int w_many, uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { @@ -2676,13 +2675,13 @@ extern my_bool my_like_range_gbk(CHARSET_INFO *cs __attribute__((unused)), *min_str++= *max_str++ = *ptr; continue; } - if (*ptr == wild_one) /* '_' in SQL */ + if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++=max_sort_char; continue; } - if (*ptr == wild_many) /* '%' in SQL */ + if (*ptr == w_many) /* '%' in SQL */ { *min_length= (uint) (min_str - min_org); *max_length= res_length; diff --git a/strings/ctype-latin1_de.c b/strings/ctype-latin1_de.c index 1fc395638a6..13a35e3c82e 100644 --- a/strings/ctype-latin1_de.c +++ b/strings/ctype-latin1_de.c @@ -358,12 +358,11 @@ static int my_strnxfrm_latin1_de(CHARSET_INFO *cs __attribute__((unused)), #define min_sort_char ((char) 0) #define max_sort_char ((char) 255) -#define wild_one '_' -#define wild_many '%' static my_bool my_like_range_latin1_de(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, uint ptr_length, - pchar escape, uint res_length, + int escape, int w_one, int w_many, + uint res_length, char *min_str, char *max_str, uint *min_length, uint *max_length) { @@ -379,13 +378,13 @@ static my_bool my_like_range_latin1_de(CHARSET_INFO *cs __attribute__((unused)), *min_str++ = *max_str++ = *ptr; continue; } - if (*ptr == wild_one) /* '_' in SQL */ + if (*ptr == w_one) /* '_' in SQL */ { *min_str++ = min_sort_char; *max_str++ = max_sort_char; continue; } - if (*ptr == wild_many) /* '%' in SQL */ + if (*ptr == w_many) /* '%' in SQL */ { *min_length = (uint)(min_str - min_org); *max_length = res_length; @@ -399,7 +398,7 @@ static my_bool my_like_range_latin1_de(CHARSET_INFO *cs __attribute__((unused)), } *min_length = *max_length = (uint) (min_str - min_org); - /* Temporary fix for handling wild_one at end of string (key compression) */ + /* Temporary fix for handling w_one at end of string (key compression) */ { char *tmp; for (tmp= min_str ; tmp > min_org && tmp[-1] == '\0';) diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 9f8cc4e1aa9..f9a9caad206 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -367,3 +367,72 @@ int my_wildcmp_8bit(CHARSET_INFO *cs, } return (str != str_end ? 1 : 0); } + + +/* +** Calculate min_str and max_str that ranges a LIKE string. +** Arguments: +** ptr Pointer to LIKE string. +** ptr_length Length of LIKE string. +** escape Escape character in LIKE. (Normally '\'). +** All escape characters should be removed from min_str and max_str +** res_length Length of min_str and max_str. +** min_str Smallest case sensitive string that ranges LIKE. +** Should be space padded to res_length. +** max_str Largest case sensitive string that ranges LIKE. +** Normally padded with the biggest character sort value. +** +** The function should return 0 if ok and 1 if the LIKE string can't be +** optimized ! +*/ + +my_bool my_like_range_simple(CHARSET_INFO *cs, + const char *ptr,uint ptr_length, + int escape, int w_one, int w_many, + uint res_length, + char *min_str,char *max_str, + uint *min_length,uint *max_length) +{ + const char *end=ptr+ptr_length; + char *min_org=min_str; + char *min_end=min_str+res_length; + + for (; ptr != end && min_str != min_end ; ptr++) + { + if (*ptr == escape && ptr+1 != end) + { + ptr++; // Skip escape + *min_str++= *max_str++ = *ptr; + continue; + } + if (*ptr == w_one) // '_' in SQL + { + *min_str++='\0'; // This should be min char + *max_str++=cs->max_sort_char; + continue; + } + if (*ptr == w_many) // '%' in SQL + { + *min_length= (uint) (min_str - min_org); + *max_length=res_length; + do { + *min_str++ = ' '; // Because if key compression + *max_str++ = cs->max_sort_char; + } while (min_str != min_end); + return 0; + } + *min_str++= *max_str++ = *ptr; + } + *min_length= *max_length = (uint) (min_str - min_org); + + /* Temporary fix for handling w_one at end of string (key compression) */ + { + char *tmp; + for (tmp= min_str ; tmp > min_org && tmp[-1] == '\0';) + *--tmp=' '; + } + + while (min_str != min_end) + *min_str++ = *max_str++ = ' '; // Because if key compression + return 0; +} diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index b670c0a5f5d..91a9fae55fa 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -263,11 +263,10 @@ static int my_strnxfrm_sjis(CHARSET_INFO *cs __attribute__((unused)), */ #define max_sort_char ((char) 255) -#define wild_one '_' -#define wild_many '%' static my_bool my_like_range_sjis(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr,uint ptr_length,pchar escape, + const char *ptr,uint ptr_length, + int escape, int w_one, int w_many, uint res_length, char *min_str,char *max_str, uint *min_length,uint *max_length) { @@ -290,13 +289,13 @@ static my_bool my_like_range_sjis(CHARSET_INFO *cs __attribute__((unused)), *min_str++ = *max_str++ = *ptr++; continue; } - if (*ptr == wild_one) { /* '_' in SQL */ + if (*ptr == w_one) { /* '_' in SQL */ *min_str++ = '\0'; /* This should be min char */ *max_str++ = max_sort_char; ptr++; continue; } - if (*ptr == wild_many) { /* '%' in SQL */ + if (*ptr == w_many) { /* '%' in SQL */ *min_length = (uint)(min_str - min_org); *max_length = res_length; do { diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 70f746c1605..86056e4f55c 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -610,11 +610,10 @@ int my_strxfrm_tis620(uchar * dest, const uchar * src, int len) thai2sortable string. min_str and max_str will be use for comparison and converted there. */ #define max_sort_chr ((char) 255) -#define wild_one '_' -#define wild_many '%' my_bool my_like_range_tis620(CHARSET_INFO *cs __attribute__((unused)), - const char *ptr, uint ptr_length, pchar escape, + const char *ptr, uint ptr_length, + int escape, int w_one, int w_many, uint res_length, char *min_str, char *max_str, uint *min_length, uint *max_length) { @@ -630,13 +629,13 @@ my_bool my_like_range_tis620(CHARSET_INFO *cs __attribute__((unused)), *min_str++= *max_str++ = *ptr; continue; } - if (*ptr == wild_one) /* '_' in SQL */ + if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++=max_sort_chr; continue; } - if (*ptr == wild_many) /* '%' in SQL */ + if (*ptr == w_many) /* '%' in SQL */ { *min_length= (uint) (min_str - min_org); *max_length=res_length; diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index 439db91294a..7ae229c0135 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -8442,7 +8442,7 @@ CHARSET_INFO my_charset_ujis = 0, /* strxfrm_multiply */ NULL, /* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_mb, /* wildcmp */ 3, /* mbmaxlen */ ismbchar_ujis, diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index d561702fc6f..b471a37a852 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -1967,7 +1967,7 @@ CHARSET_INFO my_charset_utf8 = 1, /* strxfrm_multiply */ my_strnncoll_utf8, /* strnncoll */ my_strnxfrm_utf8, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_mb, /* wildcmp */ 3, /* mbmaxlen */ my_ismbchar_utf8, /* ismbchar */ @@ -2485,7 +2485,7 @@ CHARSET_INFO my_charset_ucs2 = 1, /* strxfrm_multiply */ my_strnncoll_ucs2, /* strnncoll */ my_strnxfrm_ucs2, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_mb, /* wildcmp */ 2, /* mbmaxlen */ my_ismbchar_ucs2, /* ismbchar */ diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index dbb8d0e1a2f..73e4a5745af 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -555,8 +555,6 @@ static uchar NEAR like_range_prefix_max_win1250ch[] = { #define min_sort_char '\x00' #define max_sort_char '\xff' -#define wild_one '_' -#define wild_many '%' /* ** Calculate min_str and max_str that ranges a LIKE string. @@ -577,7 +575,8 @@ static uchar NEAR like_range_prefix_max_win1250ch[] = { static my_bool my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, uint ptr_length, - pchar escape, uint res_length, + int escape, int w_one, int w_many, + uint res_length, char *min_str, char *max_str, uint *min_length, uint *max_length) { @@ -589,10 +588,10 @@ static my_bool my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)), /* return 1; */ for (; ptr != end && min_str != min_end ; ptr++) { - if (*ptr == wild_one) { /* '_' in SQL */ + if (*ptr == w_one) { /* '_' in SQL */ break; } - if (*ptr == wild_many) { /* '%' in SQL */ + if (*ptr == w_many) { /* '%' in SQL */ break; } if (*ptr == escape && ptr + 1 != end) { /* Skip escape */ diff --git a/strings/ctype.c b/strings/ctype.c index 02774140c8d..7ce259bc00f 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -2822,7 +2822,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -2865,7 +2865,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -2907,7 +2907,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -2949,7 +2949,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -2992,7 +2992,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3034,7 +3034,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3076,7 +3076,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3118,7 +3118,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3161,7 +3161,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3203,7 +3203,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3245,7 +3245,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3287,7 +3287,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3329,7 +3329,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3371,7 +3371,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3413,7 +3413,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3456,7 +3456,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3498,7 +3498,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3541,7 +3541,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3584,7 +3584,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3626,7 +3626,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3668,7 +3668,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3710,7 +3710,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */ @@ -3752,7 +3752,7 @@ static CHARSET_INFO compiled_charsets[] = { 0, /* strxfrm_multiply */ my_strnncoll_simple,/* strnncoll */ NULL, /* strnxfrm */ - NULL, /* like_range */ + my_like_range_simple,/* like_range */ my_wildcmp_8bit, /* wildcmp */ 1, /* mbmaxlen */ NULL, /* ismbchar */