MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:December 7 2009 1:10pm
Subject:bzr commit into mysql-6.0-codebase-bugfixing branch (bar:3756) Bug#47756
View as plain text  
#At file:///home/bar/mysql-bzr/mysql-6.0-codebase-bugfixing/ based on revid:alik@stripped

 3756 Alexander Barkov	2009-12-07 [merge]
      Merging Bug#47756 from mysql-next-mr-bugfixing.

    modified:
      mysql-test/r/ctype_ldml.result
      mysql-test/t/ctype_ldml.test
      mysys/charset.c
=== modified file 'mysql-test/r/ctype_ldml.result'
--- a/mysql-test/r/ctype_ldml.result	2009-11-12 12:22:31 +0000
+++ b/mysql-test/r/ctype_ldml.result	2009-12-07 13:09:48 +0000
@@ -403,3 +403,8 @@ latin1_test	latin1	360			0
 select "foo" = "foo " collate latin1_test;
 "foo" = "foo " collate latin1_test
 1
+SET NAMES utf8 COLLATE utf8_phone_ci;
+SHOW COLLATION LIKE 'utf8_phone_ci';
+Collation	Charset	Id	Default	Compiled	Sortlen
+utf8_phone_ci	utf8	352			8
+SET NAMES utf8;

=== modified file 'mysql-test/t/ctype_ldml.test'
--- a/mysql-test/t/ctype_ldml.test	2009-11-12 12:22:31 +0000
+++ b/mysql-test/t/ctype_ldml.test	2009-12-07 13:09:48 +0000
@@ -145,3 +145,10 @@ DROP TABLE t1;
 set names latin1;
 show collation like 'latin1_test';
 select "foo" = "foo " collate latin1_test;
+
+#
+# Bug#47756 Setting 2byte collation ID with 'set names' crashes the server
+#
+SET NAMES utf8 COLLATE utf8_phone_ci;
+SHOW COLLATION LIKE 'utf8_phone_ci';
+SET NAMES utf8;

=== modified file 'mysys/charset.c'
--- a/mysys/charset.c	2009-10-15 11:12:52 +0000
+++ b/mysys/charset.c	2009-12-07 13:09:48 +0000
@@ -258,7 +258,9 @@ static int add_collation(CHARSET_INFO *c
       {
 #if defined (HAVE_CHARSET_utf8mb3) && defined(HAVE_UCA_COLLATIONS)
         copy_uca_collation(newcs, &my_charset_utf8mb3_unicode_ci);
-        newcs->state|= MY_CS_AVAILABLE | MY_CS_LOADED;
+        newcs->ctype= my_charset_utf8mb3_unicode_ci.ctype;
+        if (init_state_maps(newcs))
+          return MY_XML_ERROR;
 #endif
       }
       else


Attachment: [text/bzr-bundle] bzr/bar@mysql.com-20091207130948-c32s73srs98gkhbf.bundle
Thread
bzr commit into mysql-6.0-codebase-bugfixing branch (bar:3756) Bug#47756Alexander Barkov7 Dec