List:Internals« Previous MessageNext Message »
From:bar Date:June 28 2005 12:00pm
Subject:bk commit into 4.1 tree (bar:1.2319) BUG#9557
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of bar. When bar does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2319 05/06/28 15:00:22 bar@stripped +6 -0
  ctype_ucs.result, ctype_ucs.test, ctype_utf8.result, ctype_utf8.test:
    Fixing tests accordingly.
  ctype-ucs2.c:
    The same fix for UCS2.
  ctype-utf8.c:
    Bug #9557
    MyISAM utf8 table crash
    The problem was that my_strnncollsp_xxx could
    return big value in the range 0..0xffff.
    for some constant pairs it could return 32738,
    which is defined as MI_FOUND_WRONG_KEY in
    myisamdef.h. As a result, table considered to
    be crashed. 
    Fix to return -1,0 or 1.

  mysql-test/r/ctype_ucs.result
    1.25 05/06/28 14:59:56 bar@stripped +11 -0
    Fixing tests accordingly.

  mysql-test/t/ctype_ucs.test
    1.23 05/06/28 14:59:53 bar@stripped +12 -0
    Fixing tests accordingly.

  mysql-test/r/ctype_utf8.result
    1.57 05/06/28 14:59:15 bar@stripped +11 -0
    Fixing tests accordingly.

  mysql-test/t/ctype_utf8.test
    1.57 05/06/28 14:59:04 bar@stripped +12 -0
    Fixing tests accordingly.

  strings/ctype-ucs2.c
    1.41 05/06/28 14:58:58 bar@stripped +3 -3
    The same fix for UCS2.

  strings/ctype-utf8.c
    1.85 05/06/28 14:56:39 bar@stripped +2 -2
    Bug #9557
    MyISAM utf8 table crash
    The problem was that my_strnncollsp_xxx could
    return big value in the range 0..0xffff.
    for some constant pairs it could return 32738,
    which is defined as MI_FOUND_WRONG_KEY in
    myisamdef.h. As a result, table considered to
    be crashed. 
    Fix to return -1,0 or 1.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	bar
# Host:	bar.intranet.mysql.r18.ru
# Root:	/usr/home/bar/mysql-4.1

--- 1.24/mysql-test/r/ctype_ucs.result	2005-05-10 14:13:53 +05:00
+++ 1.25/mysql-test/r/ctype_ucs.result	2005-06-28 14:59:56 +05:00
@@ -630,3 +630,14 @@
 Warning	1265	Data truncated for column 'Field1' at row 1
 DROP TABLE t1;
 SET NAMES latin1;
+CREATE TABLE t1 (
+a varchar(255) NOT NULL default '',
+KEY a (a)
+) ENGINE=MyISAM DEFAULT CHARSET=ucs2 COLLATE ucs2_general_ci;
+insert into t1 values (0x803d);
+insert into t1 values (0x005b);
+select hex(a) from t1;
+hex(a)
+005B
+803D
+drop table t1;

--- 1.56/mysql-test/r/ctype_utf8.result	2005-06-13 18:08:21 +05:00
+++ 1.57/mysql-test/r/ctype_utf8.result	2005-06-28 14:59:15 +05:00
@@ -939,3 +939,14 @@
 ERR Имри.Афимим.Аеимимримдмримрмрирор
имримримримр имридм
ирбднримрфмририримрфмфмим.Ад.Д
имдимримрад.Адимримримрмдиримримримр
м.Дадимфшьмримд им.Адимимрн имадми	1234567890
 11 g	1234567890
 DROP TABLE t1,t2;
+CREATE TABLE t1 (
+a varchar(255) NOT NULL default '',
+KEY a (a)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
+insert into t1 values (_utf8 0xe880bd);
+insert into t1 values (_utf8 0x5b);
+select hex(a) from t1;
+hex(a)
+5B
+E880BD
+drop table t1;

--- 1.22/mysql-test/t/ctype_ucs.test	2005-05-10 14:13:54 +05:00
+++ 1.23/mysql-test/t/ctype_ucs.test	2005-06-28 14:59:53 +05:00
@@ -404,3 +404,15 @@
 INSERT INTO t1 VALUES ('-1');
 DROP TABLE t1;
 SET NAMES latin1;
+
+#
+# Bug#9557 MyISAM utf8 table crash
+#
+CREATE TABLE t1 (
+  a varchar(255) NOT NULL default '',
+  KEY a (a)
+) ENGINE=MyISAM DEFAULT CHARSET=ucs2 COLLATE ucs2_general_ci;
+insert into t1 values (0x803d);
+insert into t1 values (0x005b);
+select hex(a) from t1;
+drop table t1;

--- 1.56/mysql-test/t/ctype_utf8.test	2005-06-13 18:08:49 +05:00
+++ 1.57/mysql-test/t/ctype_utf8.test	2005-06-28 14:59:04 +05:00
@@ -788,3 +788,15 @@
 SELECT content, t2.msisdn FROM t1, t2 WHERE t1.msisdn = '1234567890';
 
 DROP TABLE t1,t2;
+
+#
+# Bug#9557 MyISAM utf8 table crash
+#
+CREATE TABLE t1 (
+  a varchar(255) NOT NULL default '',
+  KEY a (a)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE utf8_general_ci;
+insert into t1 values (_utf8 0xe880bd);
+insert into t1 values (_utf8 0x5b);
+select hex(a) from t1;
+drop table t1;

--- 1.40/strings/ctype-ucs2.c	2005-05-13 16:04:27 +05:00
+++ 1.41/strings/ctype-ucs2.c	2005-06-28 14:58:58 +05:00
@@ -209,7 +209,7 @@
     t_wc = uni_plane[plane] ? uni_plane[plane][t_wc & 0xFF].sort : t_wc;
     if ( s_wc != t_wc )
     {
-      return  ((int) s_wc) - ((int) t_wc);
+      return  s_wc > t_wc ? 1 : -1;
     }
     
     s+=s_res;
@@ -267,7 +267,7 @@
     int t_wc = uni_plane[t[0]] ? (int) uni_plane[t[0]][t[1]].sort : 
                                  (((int) t[0]) << 8) + (int) t[1];
     if ( s_wc != t_wc )
-      return  s_wc - t_wc;
+      return  s_wc > t_wc ? 1 : -1;
 
     s+= 2;
     t+= 2;
@@ -1343,7 +1343,7 @@
     }
     if ( s_wc != t_wc )
     {
-      return  ((int) s_wc) - ((int) t_wc);
+      return  s_wc > t_wc ? 1 : -1;
     }
     
     s+=s_res;

--- 1.84/strings/ctype-utf8.c	2005-04-08 16:56:05 +05:00
+++ 1.85/strings/ctype-utf8.c	2005-06-28 14:56:39 +05:00
@@ -2000,7 +2000,7 @@
     t_wc = uni_plane[plane] ? uni_plane[plane][t_wc & 0xFF].sort : t_wc;
     if ( s_wc != t_wc )
     {
-      return  ((int) s_wc) - ((int) t_wc);
+      return  s_wc > t_wc ? 1 : -1;
     }
 
     s+=s_res;
@@ -2065,7 +2065,7 @@
     t_wc = uni_plane[plane] ? uni_plane[plane][t_wc & 0xFF].sort : t_wc;
     if ( s_wc != t_wc )
     {
-      return  ((int) s_wc) - ((int) t_wc);
+      return  s_wc > t_wc ? 1 : -1;
     }
 
     s+=s_res;
Thread
bk commit into 4.1 tree (bar:1.2319) BUG#9557bar28 Jun