diff options
author | unknown <bar@mysql.com/bar.intranet.mysql.r18.ru> | 2006-07-25 18:46:43 +0500 |
---|---|---|
committer | unknown <bar@mysql.com/bar.intranet.mysql.r18.ru> | 2006-07-25 18:46:43 +0500 |
commit | 6530968211e033bde1ee8a9f2d04fdcc8e1097aa (patch) | |
tree | a11f580ec6f0a86b1bb2928dddf266337448a607 /strings | |
parent | 7b2cabd902d3b6c669bd8a0302aaf8b7568cad06 (diff) | |
download | mariadb-git-6530968211e033bde1ee8a9f2d04fdcc8e1097aa.tar.gz |
Bug#20795: extractvalue() won't accept names containing a dot (.)
Dot character was not considered as a valid identifier body character.
mysql-test/r/xml.result:
Adding test case
mysql-test/t/xml.test:
Adding test case
sql/item_xmlfunc.cc:
Treat dot character as a valid identifier body part.
strings/ctype.c:
Fixing to use '/' instead of '.' as a delimiter in charset file parser.
strings/xml.c:
Fixing to use '/' instead of '.' as a delimiter.
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype.c | 56 | ||||
-rw-r--r-- | strings/xml.c | 8 |
2 files changed, 32 insertions, 32 deletions
diff --git a/strings/ctype.c b/strings/ctype.c index 91fa1413259..3611548a125 100644 --- a/strings/ctype.c +++ b/strings/ctype.c @@ -80,35 +80,35 @@ struct my_cs_file_section_st static struct my_cs_file_section_st sec[] = { {_CS_MISC, "xml"}, - {_CS_MISC, "xml.version"}, - {_CS_MISC, "xml.encoding"}, + {_CS_MISC, "xml/version"}, + {_CS_MISC, "xml/encoding"}, {_CS_MISC, "charsets"}, - {_CS_MISC, "charsets.max-id"}, - {_CS_CHARSET, "charsets.charset"}, - {_CS_PRIMARY_ID, "charsets.charset.primary-id"}, - {_CS_BINARY_ID, "charsets.charset.binary-id"}, - {_CS_CSNAME, "charsets.charset.name"}, - {_CS_FAMILY, "charsets.charset.family"}, - {_CS_CSDESCRIPT, "charsets.charset.description"}, - {_CS_MISC, "charsets.charset.alias"}, - {_CS_MISC, "charsets.charset.ctype"}, - {_CS_CTYPEMAP, "charsets.charset.ctype.map"}, - {_CS_MISC, "charsets.charset.upper"}, - {_CS_UPPERMAP, "charsets.charset.upper.map"}, - {_CS_MISC, "charsets.charset.lower"}, - {_CS_LOWERMAP, "charsets.charset.lower.map"}, - {_CS_MISC, "charsets.charset.unicode"}, - {_CS_UNIMAP, "charsets.charset.unicode.map"}, - {_CS_COLLATION, "charsets.charset.collation"}, - {_CS_COLNAME, "charsets.charset.collation.name"}, - {_CS_ID, "charsets.charset.collation.id"}, - {_CS_ORDER, "charsets.charset.collation.order"}, - {_CS_FLAG, "charsets.charset.collation.flag"}, - {_CS_COLLMAP, "charsets.charset.collation.map"}, - {_CS_RESET, "charsets.charset.collation.rules.reset"}, - {_CS_DIFF1, "charsets.charset.collation.rules.p"}, - {_CS_DIFF2, "charsets.charset.collation.rules.s"}, - {_CS_DIFF3, "charsets.charset.collation.rules.t"}, + {_CS_MISC, "charsets/max-id"}, + {_CS_CHARSET, "charsets/charset"}, + {_CS_PRIMARY_ID, "charsets/charset/primary-id"}, + {_CS_BINARY_ID, "charsets/charset/binary-id"}, + {_CS_CSNAME, "charsets/charset/name"}, + {_CS_FAMILY, "charsets/charset/family"}, + {_CS_CSDESCRIPT, "charsets/charset/description"}, + {_CS_MISC, "charsets/charset/alias"}, + {_CS_MISC, "charsets/charset/ctype"}, + {_CS_CTYPEMAP, "charsets/charset/ctype/map"}, + {_CS_MISC, "charsets/charset/upper"}, + {_CS_UPPERMAP, "charsets/charset/upper/map"}, + {_CS_MISC, "charsets/charset/lower"}, + {_CS_LOWERMAP, "charsets/charset/lower/map"}, + {_CS_MISC, "charsets/charset/unicode"}, + {_CS_UNIMAP, "charsets/charset/unicode/map"}, + {_CS_COLLATION, "charsets/charset/collation"}, + {_CS_COLNAME, "charsets/charset/collation/name"}, + {_CS_ID, "charsets/charset/collation/id"}, + {_CS_ORDER, "charsets/charset/collation/order"}, + {_CS_FLAG, "charsets/charset/collation/flag"}, + {_CS_COLLMAP, "charsets/charset/collation/map"}, + {_CS_RESET, "charsets/charset/collation/rules/reset"}, + {_CS_DIFF1, "charsets/charset/collation/rules/p"}, + {_CS_DIFF2, "charsets/charset/collation/rules/s"}, + {_CS_DIFF3, "charsets/charset/collation/rules/t"}, {0, NULL} }; diff --git a/strings/xml.c b/strings/xml.c index 76fdd07f25e..51649dcb343 100644 --- a/strings/xml.c +++ b/strings/xml.c @@ -159,7 +159,7 @@ static int my_xml_enter(MY_XML_PARSER *st, const char *str, uint len) } if (st->attrend > st->attr) { - st->attrend[0]='.'; + st->attrend[0]= '/'; st->attrend++; } memcpy(st->attrend,str,len); @@ -188,9 +188,9 @@ static int my_xml_leave(MY_XML_PARSER *p, const char *str, uint slen) char g[32]; int rc; - /* Find previous '.' or beginning */ - for( e=p->attrend; (e>p->attr) && (e[0] != '.') ; e--); - glen = (uint) ((e[0] == '.') ? (p->attrend-e-1) : p->attrend-e); + /* Find previous '/' or beginning */ + for( e=p->attrend; (e>p->attr) && (e[0] != '/') ; e--); + glen = (uint) ((e[0] == '/') ? (p->attrend-e-1) : p->attrend-e); if (str && (slen != glen)) { |