List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:October 19 2009 12:45pm
Subject:bzr commit into mysql-5.1-bugteam branch (bar:3185) Bug#45645
View as plain text  
#At file:///home/bar/mysql-bzr/mysql-5.1.b45645/ based on revid:bar@stripped

 3185 Alexander Barkov	2009-10-19
      Bug#45645 Mysql server close all connection and restart using lower function
      Problem: the "caseinfo" member of CHARSET_INFO structure was not
      initialized for user-defined Unicode collations, which made the
      server crash.
      Fix: initializing caseinfo properly.

    modified:
      mysql-test/r/ctype_ldml.result
      mysql-test/t/ctype_ldml.test
      strings/ctype-uca.c
=== modified file 'mysql-test/r/ctype_ldml.result'
--- a/mysql-test/r/ctype_ldml.result	2009-10-12 07:43:15 +0000
+++ b/mysql-test/r/ctype_ldml.result	2009-10-19 12:45:11 +0000
@@ -41,6 +41,14 @@ efgh	efgh
 ijkl	ijkl
 DROP TABLE t1;
 #
+# Bug#45645 Mysql server close all connection and restart using lower function
+#
+CREATE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8 COLLATE utf8_test_ci;
+INSERT INTO t1 (a) VALUES ('hello!');
+SELECT * FROM t1 WHERE LOWER(a)=LOWER('N');
+a
+DROP TABLE t1;
+#
 # Bug#43827 Server closes connections and restarts
 #
 CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci);

=== modified file 'mysql-test/t/ctype_ldml.test'
--- a/mysql-test/t/ctype_ldml.test	2009-10-12 07:43:15 +0000
+++ b/mysql-test/t/ctype_ldml.test	2009-10-19 12:45:11 +0000
@@ -38,6 +38,14 @@ SELECT * FROM t1 WHERE col1=col2 ORDER B
 DROP TABLE t1;
 
 --echo #
+--echo # Bug#45645 Mysql server close all connection and restart using lower function
+--echo #
+CREATE TABLE t1 (a VARCHAR(10)) CHARACTER SET utf8 COLLATE utf8_test_ci;
+INSERT INTO t1 (a) VALUES ('hello!');
+SELECT * FROM t1 WHERE LOWER(a)=LOWER('N');
+DROP TABLE t1;
+
+--echo #
 --echo # Bug#43827 Server closes connections and restarts
 --echo #
 # Crash happened with a user-defined utf8 collation,

=== modified file 'strings/ctype-uca.c'
--- a/strings/ctype-uca.c	2009-06-04 09:35:29 +0000
+++ b/strings/ctype-uca.c	2009-10-19 12:45:11 +0000
@@ -7858,6 +7858,8 @@ static my_bool create_tailoring(CHARSET_
     return 1;
   }
   
+  cs->caseinfo= my_unicase_default;
+  
   if (!(newweights= (uint16**) (*alloc)(256*sizeof(uint16*))))
     return 1;
   bzero(newweights, 256*sizeof(uint16*));


Attachment: [text/bzr-bundle] bzr/bar@mysql.com-20091019124511-pwxyz32wk6lonnf1.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (bar:3185) Bug#45645Alexander Barkov19 Oct