summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-12-16 18:44:17 +0200
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-12-16 18:44:17 +0200
commit74e2520cd94200e326715a7733d2583a185bc6a7 (patch)
treea0d8f4957cf9d256a3cc3445c7db25384f97e249 /strings
parent8b1571d80341770818404c9cc9ed4b362ffe5710 (diff)
parent33827e7dbfc177ef52718f63eaf87e005ab3e8b5 (diff)
downloadmariadb-git-74e2520cd94200e326715a7733d2583a185bc6a7.tar.gz
merge mysql-5.5->mysql-5.5-bugteam
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-ucs2.c4
-rw-r--r--strings/ctype-utf8.c11
2 files changed, 2 insertions, 13 deletions
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index 1eb4b8de7ed..67be793c3dc 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -1464,7 +1464,7 @@ my_strnncoll_utf16_bin(CHARSET_INFO *cs,
}
if (s_wc != t_wc)
{
- return my_bincmp(s, s + s_res, t, t + t_res);
+ return s_wc > t_wc ? 1 : -1;
}
s+= s_res;
@@ -1504,7 +1504,7 @@ my_strnncollsp_utf16_bin(CHARSET_INFO *cs,
if (s_wc != t_wc)
{
- return my_bincmp(s, s + s_res, t, t + t_res);
+ return s_wc > t_wc ? 1 : -1;
}
s+= s_res;
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index 76fff72290b..324f6b9aafb 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -1967,17 +1967,6 @@ my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs,
if ((res= cs->cset->mb_wc(cs, &wc, src, se)) <= 0)
break;
src+= res;
- if (cs->mbminlen == 2) /* utf16_bin */
- {
- /*
- Reorder code points to weights as follows:
- U+0000..U+D7FF -> [00][00][00]..[00][D7][FF] BMP part #1
- U+10000..U+10FFFF -> [01][00][00]..[10][FF][FF] Supplementary
- U+E000..U+FFFF -> [20][E0][00]..[20][FF][FF] BMP part #2
- */
- if (wc >= 0xE000 && wc <= 0xFFFF)
- wc+= 0x200000;
- }
*dst++= (uchar) (wc >> 16);
*dst++= (uchar) ((wc >> 8) & 0xFF);
*dst++= (uchar) (wc & 0xFF);