summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mysql.com>2009-11-09 13:45:40 +0400
committerAlexander Barkov <bar@mysql.com>2009-11-09 13:45:40 +0400
commit7e8b208d3bd81c81e5451ad06db5c182d17f91bc (patch)
treebe4ef0a324f11e61e74326a6f02ad471d549de8a /strings
parentaea5f15e3da7a261fb590d72a6e1f0cc1d10fc36 (diff)
downloadmariadb-git-7e8b208d3bd81c81e5451ad06db5c182d17f91bc.tar.gz
Backporting Bug#37129 LDML lacks <i> rule
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-uca.c11
-rw-r--r--strings/ctype.c5
2 files changed, 15 insertions, 1 deletions
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c
index ecf92c1b7d4..ee4d052b3b3 100644
--- a/strings/ctype-uca.c
+++ b/strings/ctype-uca.c
@@ -7661,6 +7661,13 @@ static my_coll_lexem_num my_coll_lexem_next(MY_COLL_LEXEM *lexem)
goto ex;
}
+ if (beg[0] == '=')
+ {
+ beg++;
+ rc= MY_COLL_LEXEM_DIFF;
+ goto ex;
+ }
+
if (beg[0] == '<')
{
for (beg++, lexem->diff= 1;
@@ -7821,6 +7828,10 @@ static int my_coll_rule_parse(MY_COLL_RULE *rule, size_t mitems,
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");
diff --git a/strings/ctype.c b/strings/ctype.c
index 75d76aceea3..4891e657b6e 100644
--- a/strings/ctype.c
+++ b/strings/ctype.c
@@ -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,const char *attr, size_t len)
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,const char *attr, size_t len)
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))