1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

5.5 merge

This commit is contained in:
Sergei Golubchik
2014-05-09 12:35:11 +02:00
1865 changed files with 98295 additions and 85893 deletions

View File

@@ -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