summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-05-26 19:32:28 +0400
committerAlexander Barkov <bar@mariadb.org>2017-05-26 19:32:28 +0400
commit9bc32256427373e5bfa78f17c5854ac4e6a2fc31 (patch)
tree748fd55866bcbc4de5eee1c078ac8d2cad5b6fd7 /sql/item_xmlfunc.cc
parent77b2f55f61a4e3ba642049a01651c92bfb0a7d9d (diff)
parentca7cf69cb13285585922722063af888b957580ee (diff)
downloadmariadb-git-9bc32256427373e5bfa78f17c5854ac4e6a2fc31.tar.gz
Merge tag 'mariadb-10.2.6' into bb-10.2-ext
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r--sql/item_xmlfunc.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc
index 86b470eed6f..ba33d103d0c 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
@@ -2836,9 +2837,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;