@@ -5207,24 +5207,6 @@ static int my_uni_utf8mb3_no_range(CHARSET_INFO *cs __attribute__((unused)),
52075207}
52085208
52095209
5210- static inline void
5211- my_tolower_utf8mb3 (MY_UNICASE_INFO * uni_plane , my_wc_t * wc )
5212- {
5213- MY_UNICASE_CHARACTER * page ;
5214- if ((page = uni_plane -> page [(* wc >> 8 ) & 0xFF ]))
5215- * wc = page [* wc & 0xFF ].tolower ;
5216- }
5217-
5218-
5219- static inline void
5220- my_toupper_utf8mb3 (MY_UNICASE_INFO * uni_plane , my_wc_t * wc )
5221- {
5222- MY_UNICASE_CHARACTER * page ;
5223- if ((page = uni_plane -> page [(* wc >> 8 ) & 0xFF ]))
5224- * wc = page [* wc & 0xFF ].toupper ;
5225- }
5226-
5227-
52285210static size_t my_caseup_utf8mb3 (CHARSET_INFO * cs ,
52295211 const char * src , size_t srclen ,
52305212 char * dst , size_t dstlen )
@@ -5239,7 +5221,7 @@ static size_t my_caseup_utf8mb3(CHARSET_INFO *cs,
52395221 while ((src < srcend ) &&
52405222 (srcres = my_utf8mb3_uni (cs , & wc , (uchar * ) src , (uchar * ) srcend )) > 0 )
52415223 {
5242- my_toupper_utf8mb3 (uni_plane , & wc );
5224+ my_toupper_unicode_bmp (uni_plane , & wc );
52435225 if ((dstres = my_uni_utf8mb3 (cs , wc , (uchar * ) dst , (uchar * ) dstend )) <= 0 )
52445226 break ;
52455227 src += srcres ;
@@ -5292,7 +5274,7 @@ static size_t my_caseup_str_utf8mb3(CHARSET_INFO *cs, char *src)
52925274 while (* src &&
52935275 (srcres = my_utf8mb3_uni_no_range (cs , & wc , (uchar * ) src )) > 0 )
52945276 {
5295- my_toupper_utf8mb3 (uni_plane , & wc );
5277+ my_toupper_unicode_bmp (uni_plane , & wc );
52965278 if ((dstres = my_uni_utf8mb3_no_range (cs , wc , (uchar * ) dst )) <= 0 )
52975279 break ;
52985280 src += srcres ;
@@ -5317,7 +5299,7 @@ static size_t my_casedn_utf8mb3(CHARSET_INFO *cs,
53175299 while ((src < srcend ) &&
53185300 (srcres = my_utf8mb3_uni (cs , & wc , (uchar * ) src , (uchar * )srcend )) > 0 )
53195301 {
5320- my_tolower_utf8mb3 (uni_plane , & wc );
5302+ my_tolower_unicode_bmp (uni_plane , & wc );
53215303 if ((dstres = my_uni_utf8mb3 (cs , wc , (uchar * ) dst , (uchar * ) dstend )) <= 0 )
53225304 break ;
53235305 src += srcres ;
@@ -5338,7 +5320,7 @@ static size_t my_casedn_str_utf8mb3(CHARSET_INFO *cs, char *src)
53385320 while (* src &&
53395321 (srcres = my_utf8mb3_uni_no_range (cs , & wc , (uchar * ) src )) > 0 )
53405322 {
5341- my_tolower_utf8mb3 (uni_plane , & wc );
5323+ my_tolower_unicode_bmp (uni_plane , & wc );
53425324 if ((dstres = my_uni_utf8mb3_no_range (cs , wc , (uchar * ) dst )) <= 0 )
53435325 break ;
53445326 src += srcres ;
@@ -5397,7 +5379,7 @@ int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t)
53975379 It represents a single byte character.
53985380 Convert it into weight according to collation.
53995381 */
5400- s_wc = my_unicase_default_page00 [( uchar ) s [0 ]]. tolower ;
5382+ s_wc = my_u300_tolower_7bit (( uchar ) s [0 ]) ;
54015383 s ++ ;
54025384 }
54035385 else
@@ -5430,7 +5412,7 @@ int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t)
54305412 s += res ;
54315413
54325414 /* Convert Unicode code into weight according to collation */
5433- my_tolower_utf8mb3 (uni_plane , & s_wc );
5415+ my_tolower_unicode_bmp (uni_plane , & s_wc );
54345416 }
54355417
54365418
@@ -5439,7 +5421,7 @@ int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t)
54395421 if ((uchar ) t [0 ] < 128 )
54405422 {
54415423 /* Convert single byte character into weight */
5442- t_wc = my_unicase_default_page00 [( uchar ) t [0 ]]. tolower ;
5424+ t_wc = my_u300_tolower_7bit (( uchar ) t [0 ]) ;
54435425 t ++ ;
54445426 }
54455427 else
@@ -5450,7 +5432,7 @@ int my_strcasecmp_utf8mb3(CHARSET_INFO *cs, const char *s, const char *t)
54505432 t += res ;
54515433
54525434 /* Convert code into weight */
5453- my_tolower_utf8mb3 (uni_plane , & t_wc );
5435+ my_tolower_unicode_bmp (uni_plane , & t_wc );
54545436 }
54555437
54565438 /* Now we have two weights, let's compare them */
@@ -7678,30 +7660,6 @@ my_wc_mb_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)),
76787660}
76797661
76807662
7681- static inline void
7682- my_tolower_utf8mb4 (MY_UNICASE_INFO * uni_plane , my_wc_t * wc )
7683- {
7684- if (* wc <= uni_plane -> maxchar )
7685- {
7686- MY_UNICASE_CHARACTER * page ;
7687- if ((page = uni_plane -> page [(* wc >> 8 )]))
7688- * wc = page [* wc & 0xFF ].tolower ;
7689- }
7690- }
7691-
7692-
7693- static inline void
7694- my_toupper_utf8mb4 (MY_UNICASE_INFO * uni_plane , my_wc_t * wc )
7695- {
7696- if (* wc <= uni_plane -> maxchar )
7697- {
7698- MY_UNICASE_CHARACTER * page ;
7699- if ((page = uni_plane -> page [(* wc >> 8 )]))
7700- * wc = page [* wc & 0xFF ].toupper ;
7701- }
7702- }
7703-
7704-
77057663static size_t
77067664my_caseup_utf8mb4 (CHARSET_INFO * cs , const char * src , size_t srclen ,
77077665 char * dst , size_t dstlen )
@@ -7717,7 +7675,7 @@ my_caseup_utf8mb4(CHARSET_INFO *cs, const char *src, size_t srclen,
77177675 (srcres = my_mb_wc_utf8mb4 (cs , & wc ,
77187676 (uchar * ) src , (uchar * ) srcend )) > 0 )
77197677 {
7720- my_toupper_utf8mb4 (uni_plane , & wc );
7678+ my_toupper_unicode (uni_plane , & wc );
77217679 if ((dstres = my_wc_mb_utf8mb4 (cs , wc , (uchar * ) dst , (uchar * ) dstend )) <= 0 )
77227680 break ;
77237681 src += srcres ;
@@ -7784,7 +7742,7 @@ my_caseup_str_utf8mb4(CHARSET_INFO *cs, char *src)
77847742 while (* src &&
77857743 (srcres = my_mb_wc_utf8mb4_no_range (cs , & wc , (uchar * ) src )) > 0 )
77867744 {
7787- my_toupper_utf8mb4 (uni_plane , & wc );
7745+ my_toupper_unicode (uni_plane , & wc );
77887746 if ((dstres = my_wc_mb_utf8mb4_no_range (cs , wc , (uchar * ) dst )) <= 0 )
77897747 break ;
77907748 src += srcres ;
@@ -7811,7 +7769,7 @@ my_casedn_utf8mb4(CHARSET_INFO *cs,
78117769 (srcres = my_mb_wc_utf8mb4 (cs , & wc ,
78127770 (uchar * ) src , (uchar * ) srcend )) > 0 )
78137771 {
7814- my_tolower_utf8mb4 (uni_plane , & wc );
7772+ my_tolower_unicode (uni_plane , & wc );
78157773 if ((dstres = my_wc_mb_utf8mb4 (cs , wc , (uchar * ) dst , (uchar * ) dstend )) <= 0 )
78167774 break ;
78177775 src += srcres ;
@@ -7833,7 +7791,7 @@ my_casedn_str_utf8mb4(CHARSET_INFO *cs, char *src)
78337791 while (* src &&
78347792 (srcres = my_mb_wc_utf8mb4_no_range (cs , & wc , (uchar * ) src )) > 0 )
78357793 {
7836- my_tolower_utf8mb4 (uni_plane , & wc );
7794+ my_tolower_unicode (uni_plane , & wc );
78377795 if ((dstres = my_wc_mb_utf8mb4_no_range (cs , wc , (uchar * ) dst )) <= 0 )
78387796 break ;
78397797 src += srcres ;
@@ -7888,7 +7846,7 @@ my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
78887846 It represents a single byte character.
78897847 Convert it into weight according to collation.
78907848 */
7891- s_wc = my_unicase_default_page00 [( uchar ) s [0 ]]. tolower ;
7849+ s_wc = my_u300_tolower_7bit (( uchar ) s [0 ]) ;
78927850 s ++ ;
78937851 }
78947852 else
@@ -7903,7 +7861,7 @@ my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
79037861 return strcmp (s , t );
79047862 s += res ;
79057863
7906- my_tolower_utf8mb4 (uni_plane , & s_wc );
7864+ my_tolower_unicode (uni_plane , & s_wc );
79077865 }
79087866
79097867
@@ -7912,7 +7870,7 @@ my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
79127870 if ((uchar ) t [0 ] < 128 )
79137871 {
79147872 /* Convert single byte character into weight */
7915- t_wc = my_unicase_default_page00 [( uchar ) t [0 ]]. tolower ;
7873+ t_wc = my_u300_tolower_7bit (( uchar ) t [0 ]) ;
79167874 t ++ ;
79177875 }
79187876 else
@@ -7922,7 +7880,7 @@ my_strcasecmp_utf8mb4(CHARSET_INFO *cs, const char *s, const char *t)
79227880 return strcmp (s , t );
79237881 t += res ;
79247882
7925- my_tolower_utf8mb4 (uni_plane , & t_wc );
7883+ my_tolower_unicode (uni_plane , & t_wc );
79267884 }
79277885
79287886 /* Now we have two weights, let's compare them */
0 commit comments