List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:December 3 2010 9:28am
Subject:bzr commit into mysql-trunk-bugfixing branch (bar:3408) Bug#55980
View as plain text  
#At file:///home/bar/mysql-bzr/mysql-trunk-bugfixing.w5510/ based on revid:marc.alff@stripped

 3408 Alexander Barkov	2010-12-03
      Bug#55980 
      
      Reverting the "utf16_bin is byte-by-byte" patch.
      
      This reverting patch is actually already in mysql-5.5-security,
      which will be merged to mysql-trunk-* later this month.
      But I need this reverting patch now, as pre-requisite for WL#4616.
      
      Applying it to mysql-trunk-bugfixing manually, not to wait for merge.

    modified:
      mysql-test/r/ctype_utf16.result
      strings/ctype-ucs2.c
      strings/ctype-utf8.c
=== modified file 'mysql-test/r/ctype_utf16.result'
--- a/mysql-test/r/ctype_utf16.result	2010-09-28 15:29:26 +0000
+++ b/mysql-test/r/ctype_utf16.result	2010-12-03 09:24:07 +0000
@@ -625,23 +625,23 @@ INSERT INTO t1 VALUES (_utf8mb4 0xCE85),
 SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
 HEX(a)	HEX(CONVERT(a USING utf8mb4))
 0385	CE85
+FF9D	EFBE9D
 D800DF84	F0908E84
 DBC0DC00	F4808080
-FF9D	EFBE9D
 ALTER TABLE t1 ADD KEY(a);
 SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a;
 HEX(a)	HEX(CONVERT(a USING utf8mb4))
 0385	CE85
+FF9D	EFBE9D
 D800DF84	F0908E84
 DBC0DC00	F4808080
-FF9D	EFBE9D
 # Additional test for bug#37244 Character sets: short utf8_bin weight_string value
 SELECT HEX(a), HEX(WEIGHT_STRING(a)) FROM t1 ORDER BY a;
 HEX(a)	HEX(WEIGHT_STRING(a))
 0385	000385
+FF9D	00FF9D
 D800DF84	010384
 DBC0DC00	100000
-FF9D	20FF9D
 DROP TABLE IF EXISTS t1;
 select @@collation_connection;
 @@collation_connection

=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c	2010-11-26 13:29:18 +0000
+++ b/strings/ctype-ucs2.c	2010-12-03 09:24:07 +0000
@@ -1488,7 +1488,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;
@@ -1528,7 +1528,7 @@ my_strnncollsp_utf16_bin(CHARSET_INFO *c
 
     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;

=== modified file 'strings/ctype-utf8.c'
--- a/strings/ctype-utf8.c	2010-10-13 23:16:09 +0000
+++ b/strings/ctype-utf8.c	2010-12-03 09:24:07 +0000
@@ -4961,17 +4961,6 @@ my_strnxfrm_unicode_full_bin(CHARSET_INF
     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);
     if (dst < de)
     {


Attachment: [text/bzr-bundle] bzr/bar@mysql.com-20101203092407-3uegjah1wfwi4n9u.bundle
Thread
bzr commit into mysql-trunk-bugfixing branch (bar:3408) Bug#55980Alexander Barkov3 Dec