summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@skysql.com>2014-05-21 11:09:55 -0400
committerNirbhay Choubey <nirbhay@skysql.com>2014-05-21 11:09:55 -0400
commit086af8367ed2499adae378638225ceb14c85f046 (patch)
tree953720d86a4decd67a24b560ffbe277900ff9609 /strings
parent558995ad84ca1348dfe681a8d111650225fcc205 (diff)
parent1170a54060168d885cbf682836342d4fc4ccae1a (diff)
downloadmariadb-git-086af8367ed2499adae378638225ceb14c85f046.tar.gz
bzr merge -r4209 maria/10.0.
Diffstat (limited to 'strings')
-rw-r--r--strings/ctype-utf8.c2
-rw-r--r--strings/xml.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c
index aba179b154c..96d5ea26a3c 100644
--- a/strings/ctype-utf8.c
+++ b/strings/ctype-utf8.c
@@ -5688,7 +5688,7 @@ struct charset_info_st my_charset_utf8_general_mysql500_ci=
struct charset_info_st my_charset_utf8_bin=
{
83,0,0, /* number */
- MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE, /* state */
+ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_BINSORT|MY_CS_UNICODE, /* state */
"utf8", /* cs name */
"utf8_bin", /* name */
"", /* comment */
diff --git a/strings/xml.c b/strings/xml.c
index 8073b881a47..4685a04faec 100644
--- a/strings/xml.c
+++ b/strings/xml.c
@@ -286,7 +286,7 @@ static void mstr(char *s,const char *src,size_t l1, size_t l2)
static int my_xml_leave(MY_XML_PARSER *p, const char *str, size_t slen)
{
- char *e;
+ char *e, *tag;
size_t glen;
char s[32];
char g[32];
@@ -295,13 +295,14 @@ static int my_xml_leave(MY_XML_PARSER *p, const char *str, size_t slen)
/* Find previous '/' or beginning */
for (e= p->attr.end; (e > p->attr.start) && (e[0] != '/') ; e--);
glen= (size_t) ((e[0] == '/') ? (p->attr.end - e - 1) : p->attr.end - e);
+ tag= e[0] == '/' ? e + 1 : e;
- if (str && (slen != glen))
+ if (str && (slen != glen || memcmp(str, tag, slen)))
{
mstr(s,str,sizeof(s)-1,slen);
if (glen)
{
- mstr(g,e+1,sizeof(g)-1,glen),
+ mstr(g, tag, sizeof(g)-1, glen);
sprintf(p->errstr,"'</%s>' unexpected ('</%s>' wanted)",s,g);
}
else