#At file:///home/bar/mysql-bzr/mysql-6.0-b37854/
2824 Alexander Barkov 2008-09-04
Bug#37854 Test fails/aborts for collate latin2_czech_cs used with SET and ENUM
Problem: my_strnncoll_czech() hunged when comparing two equal strings.
Loop didn't break on end-of-string (i.e. when NEXT_CMP_VALUE returned value=-1).
Fix: changing loop condition to break on negative values.
modified:
mysql-test/r/ctype_latin2_ch.result
mysql-test/t/ctype_latin2_ch.test
strings/ctype-czech.c
=== modified file 'mysql-test/r/ctype_latin2_ch.result'
--- a/mysql-test/r/ctype_latin2_ch.result 2008-07-24 12:45:27 +0000
+++ b/mysql-test/r/ctype_latin2_ch.result 2008-09-04 08:19:06 +0000
@@ -763,3 +763,16 @@ z
Z
DROP TABLE t1;
SET NAMES latin2;
+CREATE TABLE t2(colours SET('red','blue','yellow'))CHARACTER SET latin2 COLLATE
+latin2_czech_cs;
+CREATE TABLE t1(continent ENUM('Asia', 'Europe','Africa','Antartica'))CHARACTER SET
latin2
+COLLATE latin2_czech_cs;
+INSERT INTO t1 VALUES('Asia');
+INSERT INTO t2 VALUES('blue');
+SELECT * FROM t1;
+continent
+Asia
+SELECT * FROM t2;
+colours
+blue
+DROP TABLE t1, t2;
=== modified file 'mysql-test/t/ctype_latin2_ch.test'
--- a/mysql-test/t/ctype_latin2_ch.test 2008-07-24 12:45:27 +0000
+++ b/mysql-test/t/ctype_latin2_ch.test 2008-09-04 08:19:06 +0000
@@ -182,3 +182,16 @@ SELECT * FROM t1 ORDER BY s1;
DROP TABLE t1;
SET NAMES latin2;
+
+#
+# Bug#37854 Test fails/aborts for collate latin2_czech_cs used with SET and ENUM
datatypes
+#
+CREATE TABLE t2(colours SET('red','blue','yellow'))CHARACTER SET latin2 COLLATE
+latin2_czech_cs;
+CREATE TABLE t1(continent ENUM('Asia', 'Europe','Africa','Antartica'))CHARACTER SET
latin2
+COLLATE latin2_czech_cs;
+INSERT INTO t1 VALUES('Asia');
+INSERT INTO t2 VALUES('blue');
+SELECT * FROM t1;
+SELECT * FROM t2;
+DROP TABLE t1, t2;
=== modified file 'strings/ctype-czech.c'
--- a/strings/ctype-czech.c 2008-07-23 09:43:50 +0000
+++ b/strings/ctype-czech.c 2008-09-04 08:19:06 +0000
@@ -364,7 +364,7 @@ static int my_strnncoll_czech(CHARSET_IN
if ((diff = v1 - v2))
return diff;
}
- while (v1);
+ while (v1 >= 0);
return 0;
}
| Thread |
|---|
| • bzr commit into mysql-6.0 branch (bar:2824) Bug#37854 | Alexander Barkov | 4 Sep |