Commit c861f327 authored by rburnett@bk-internal.mysql.com's avatar rburnett@bk-internal.mysql.com

Merge bk-internal.mysql.com:/data0/bk/mysql-5.1

into  bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
parents 554b1f01 b1b24507
...@@ -704,3 +704,9 @@ a ...@@ -704,3 +704,9 @@ a
select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns'); select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns');
extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns') extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns')
myns myns
select extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/foo.bar');
extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/foo.bar')
Data
select extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/something');
extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/something')
Otherdata
...@@ -354,3 +354,9 @@ DROP PROCEDURE p2; ...@@ -354,3 +354,9 @@ DROP PROCEDURE p2;
select extractValue('<ns:element xmlns:ns="myns"/>','count(ns:element)'); select extractValue('<ns:element xmlns:ns="myns"/>','count(ns:element)');
select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element'); select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element');
select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns'); select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns');
#
# Bug#20795 extractvalue() won't accept names containing a dot (.)
#
select extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/foo.bar');
select extractValue('<foo><foo.bar>Data</foo.bar><something>Otherdata</something></foo>','/foo/something');
...@@ -1356,7 +1356,8 @@ my_xpath_lex_scan(MY_XPATH *xpath, ...@@ -1356,7 +1356,8 @@ my_xpath_lex_scan(MY_XPATH *xpath,
(length= xpath->cs->cset->ctype(xpath->cs, &ctype, (length= xpath->cs->cset->ctype(xpath->cs, &ctype,
(const uchar*) beg, (const uchar*) beg,
(const uchar*) end)) > 0 && (const uchar*) end)) > 0 &&
((ctype & (_MY_L | _MY_U | _MY_NMR)) || *beg == '_' || *beg == '-') ; ((ctype & (_MY_L | _MY_U | _MY_NMR)) ||
*beg == '_' || *beg == '-' || *beg == '.') ;
beg+= length) /* no op */; beg+= length) /* no op */;
lex->end= beg; lex->end= beg;
......
...@@ -80,35 +80,35 @@ struct my_cs_file_section_st ...@@ -80,35 +80,35 @@ struct my_cs_file_section_st
static struct my_cs_file_section_st sec[] = static struct my_cs_file_section_st sec[] =
{ {
{_CS_MISC, "xml"}, {_CS_MISC, "xml"},
{_CS_MISC, "xml.version"}, {_CS_MISC, "xml/version"},
{_CS_MISC, "xml.encoding"}, {_CS_MISC, "xml/encoding"},
{_CS_MISC, "charsets"}, {_CS_MISC, "charsets"},
{_CS_MISC, "charsets.max-id"}, {_CS_MISC, "charsets/max-id"},
{_CS_CHARSET, "charsets.charset"}, {_CS_CHARSET, "charsets/charset"},
{_CS_PRIMARY_ID, "charsets.charset.primary-id"}, {_CS_PRIMARY_ID, "charsets/charset/primary-id"},
{_CS_BINARY_ID, "charsets.charset.binary-id"}, {_CS_BINARY_ID, "charsets/charset/binary-id"},
{_CS_CSNAME, "charsets.charset.name"}, {_CS_CSNAME, "charsets/charset/name"},
{_CS_FAMILY, "charsets.charset.family"}, {_CS_FAMILY, "charsets/charset/family"},
{_CS_CSDESCRIPT, "charsets.charset.description"}, {_CS_CSDESCRIPT, "charsets/charset/description"},
{_CS_MISC, "charsets.charset.alias"}, {_CS_MISC, "charsets/charset/alias"},
{_CS_MISC, "charsets.charset.ctype"}, {_CS_MISC, "charsets/charset/ctype"},
{_CS_CTYPEMAP, "charsets.charset.ctype.map"}, {_CS_CTYPEMAP, "charsets/charset/ctype/map"},
{_CS_MISC, "charsets.charset.upper"}, {_CS_MISC, "charsets/charset/upper"},
{_CS_UPPERMAP, "charsets.charset.upper.map"}, {_CS_UPPERMAP, "charsets/charset/upper/map"},
{_CS_MISC, "charsets.charset.lower"}, {_CS_MISC, "charsets/charset/lower"},
{_CS_LOWERMAP, "charsets.charset.lower.map"}, {_CS_LOWERMAP, "charsets/charset/lower/map"},
{_CS_MISC, "charsets.charset.unicode"}, {_CS_MISC, "charsets/charset/unicode"},
{_CS_UNIMAP, "charsets.charset.unicode.map"}, {_CS_UNIMAP, "charsets/charset/unicode/map"},
{_CS_COLLATION, "charsets.charset.collation"}, {_CS_COLLATION, "charsets/charset/collation"},
{_CS_COLNAME, "charsets.charset.collation.name"}, {_CS_COLNAME, "charsets/charset/collation/name"},
{_CS_ID, "charsets.charset.collation.id"}, {_CS_ID, "charsets/charset/collation/id"},
{_CS_ORDER, "charsets.charset.collation.order"}, {_CS_ORDER, "charsets/charset/collation/order"},
{_CS_FLAG, "charsets.charset.collation.flag"}, {_CS_FLAG, "charsets/charset/collation/flag"},
{_CS_COLLMAP, "charsets.charset.collation.map"}, {_CS_COLLMAP, "charsets/charset/collation/map"},
{_CS_RESET, "charsets.charset.collation.rules.reset"}, {_CS_RESET, "charsets/charset/collation/rules/reset"},
{_CS_DIFF1, "charsets.charset.collation.rules.p"}, {_CS_DIFF1, "charsets/charset/collation/rules/p"},
{_CS_DIFF2, "charsets.charset.collation.rules.s"}, {_CS_DIFF2, "charsets/charset/collation/rules/s"},
{_CS_DIFF3, "charsets.charset.collation.rules.t"}, {_CS_DIFF3, "charsets/charset/collation/rules/t"},
{0, NULL} {0, NULL}
}; };
......
...@@ -159,7 +159,7 @@ static int my_xml_enter(MY_XML_PARSER *st, const char *str, uint len) ...@@ -159,7 +159,7 @@ static int my_xml_enter(MY_XML_PARSER *st, const char *str, uint len)
} }
if (st->attrend > st->attr) if (st->attrend > st->attr)
{ {
st->attrend[0]='.'; st->attrend[0]= '/';
st->attrend++; st->attrend++;
} }
memcpy(st->attrend,str,len); memcpy(st->attrend,str,len);
...@@ -188,9 +188,9 @@ static int my_xml_leave(MY_XML_PARSER *p, const char *str, uint slen) ...@@ -188,9 +188,9 @@ static int my_xml_leave(MY_XML_PARSER *p, const char *str, uint slen)
char g[32]; char g[32];
int rc; int rc;
/* Find previous '.' or beginning */ /* Find previous '/' or beginning */
for( e=p->attrend; (e>p->attr) && (e[0] != '.') ; e--); for( e=p->attrend; (e>p->attr) && (e[0] != '/') ; e--);
glen = (uint) ((e[0] == '.') ? (p->attrend-e-1) : p->attrend-e); glen = (uint) ((e[0] == '/') ? (p->attrend-e-1) : p->attrend-e);
if (str && (slen != glen)) if (str && (slen != glen))
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment