From: Date: September 12 2008 12:56pm Subject: bzr commit into mysql-6.0 branch (bar:2834) Bug#37129 List-Archive: http://lists.mysql.com/commits/53957 X-Bug: 37129 Message-Id: <200809121056.m8CAuhe9004058@bar.myoffice.izhnet.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///home/bar/mysql-bzr/mysql-6.0.b37129/ 2834 Alexander Barkov 2008-09-12 Bug#37129 LDML lacks rule Problem: LDML didn't understand '' tag in character set definition file Index.xml. Manual incorrectly used '' instead of '' in: http://dev.mysql.com/doc/refman/5.1/en/adding-collation-unicode-uca.html Fix: Adding support for '' tag. Manual should be changed accordingly. modified: mysql-test/std_data/Index.xml strings/ctype-uca.c strings/ctype.c === modified file 'mysql-test/std_data/Index.xml' --- a/mysql-test/std_data/Index.xml 2008-07-24 11:33:35 +0000 +++ b/mysql-test/std_data/Index.xml 2008-09-12 10:52:06 +0000 @@ -4,7 +4,7 @@ a - b + b === modified file 'strings/ctype-uca.c' --- a/strings/ctype-uca.c 2008-07-23 09:43:50 +0000 +++ b/strings/ctype-uca.c 2008-09-12 10:52:06 +0000 @@ -7684,6 +7684,13 @@ static my_coll_lexem_num my_coll_lexem_n goto ex; } + if (beg[0] == '=') + { + beg++; + rc= MY_COLL_LEXEM_DIFF; + goto ex; + } + if (beg[0] == '<') { for (beg++, lexem->diff= 1; @@ -7844,6 +7851,10 @@ static int my_coll_rule_parse(MY_COLL_RU item.diff[1]= 0; item.diff[2]= 0; } + else if (lexem.diff == 0) + { + item.diff[0]= item.diff[1]= item.diff[2]= 0; + } if (nitems >= mitems) { my_coll_lexem_print_error(&lexem,errstr,errsize-1,"Too many rules"); === modified file 'strings/ctype.c' --- a/strings/ctype.c 2008-05-29 15:44:11 +0000 +++ b/strings/ctype.c 2008-09-12 10:52:06 +0000 @@ -74,6 +74,7 @@ struct my_cs_file_section_st #define _CS_DIFF1 19 #define _CS_DIFF2 20 #define _CS_DIFF3 21 +#define _CS_IDENTICAL 22 static struct my_cs_file_section_st sec[] = @@ -108,6 +109,7 @@ static struct my_cs_file_section_st sec[ {_CS_DIFF1, "charsets/charset/collation/rules/p"}, {_CS_DIFF2, "charsets/charset/collation/rules/s"}, {_CS_DIFF3, "charsets/charset/collation/rules/t"}, + {_CS_IDENTICAL, "charsets/charset/collation/rules/i"}, {0, NULL} }; @@ -269,6 +271,7 @@ static int cs_value(MY_XML_PARSER *st,co case _CS_DIFF1: case _CS_DIFF2: case _CS_DIFF3: + case _CS_IDENTICAL: { /* Convert collation description from @@ -276,7 +279,7 @@ static int cs_value(MY_XML_PARSER *st,co into ICU Collation Customization expression. */ char arg[16]; - const char *cmd[]= {"&","<","<<","<<<"}; + const char *cmd[]= {"&","<","<<","<<<","="}; i->cs.tailoring= i->tailoring; mstr(arg,attr,len,sizeof(arg)-1); if (i->tailoring_length + 20 < sizeof(i->tailoring))