mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
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.
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user