diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-04-28 20:19:32 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-04-28 20:19:32 +0200 |
commit | e74f2e2b8629ab79a6c2f93acff6e17a7ddee7ff (patch) | |
tree | c6f2f7343bf9ad5dfd40ec83d5485ec3e05d26d2 /sql/item_xmlfunc.cc | |
parent | b82c602db588cfa688278ef772050c004590c124 (diff) | |
parent | 49552cf1f7adb3f3b7bb53696cc178363e4d9cb2 (diff) | |
download | mariadb-git-e74f2e2b8629ab79a6c2f93acff6e17a7ddee7ff.tar.gz |
Merge branch '10.0' 10.1
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r-- | sql/item_xmlfunc.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index c1140946e87..0741da155ac 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -1,4 +1,5 @@ -/* Copyright (c) 2005, 2013, Oracle and/or its affiliates. +/* Copyright (c) 2005, 2016, Oracle and/or its affiliates. + Copyright (c) 2009, 2017, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2820,9 +2821,9 @@ int xml_enter(MY_XML_PARSER *st,const char *attr, size_t len) node.parent= data->parent; // Set parent for the new node to old parent data->parent= numnodes; // Remember current node as new parent - DBUG_ASSERT(data->level <= MAX_LEVEL); + DBUG_ASSERT(data->level < MAX_LEVEL); data->pos[data->level]= numnodes; - if (data->level < MAX_LEVEL) + if (data->level < MAX_LEVEL - 1) node.level= data->level++; else return MY_XML_ERROR; |