diff options
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r-- | sql/item_xmlfunc.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index 68d85418324..5601a2b18c6 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -1969,6 +1969,13 @@ my_xpath_parse_FilterExpr_opt_slashes_RelativeLocationPath(MY_XPATH *xpath) if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_SLASH)) return 1; + if (xpath->item->type() != Item::XPATH_NODESET) + { + xpath->lasttok= xpath->prevtok; + xpath->error= 1; + return 0; + } + my_xpath_parse_term(xpath, MY_XPATH_LEX_SLASH); return my_xpath_parse_RelativeLocationPath(xpath); } @@ -1976,7 +1983,6 @@ static int my_xpath_parse_PathExpr(MY_XPATH *xpath) { return my_xpath_parse_LocationPath(xpath) || my_xpath_parse_FilterExpr_opt_slashes_RelativeLocationPath(xpath); - } |