summaryrefslogtreecommitdiff
path: root/sql/item_xmlfunc.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-05-09 13:24:52 +0200
committerSergei Golubchik <serg@mariadb.org>2017-05-09 13:24:52 +0200
commitc91ecf9e9bebf3cf2dafbd3193de4df94be09870 (patch)
treea9ab429c8e8a6a50c38557cbdd38d9612480f49c /sql/item_xmlfunc.cc
parent2645bda5f20ab10bc26dc1cb69f91b5505c1faae (diff)
parentc92168fcd26aad35bd4cb5d65175e3545133f201 (diff)
downloadmariadb-git-c91ecf9e9bebf3cf2dafbd3193de4df94be09870.tar.gz
Merge branch '10.1' into 10.2
Revert commit db0917f68f, because the fix for MDEV-12696 is coming from 5.5 and 10.1 in this merge.
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 4d848a0f737..10dda8f20e8 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;