diff options
author | Mats Kindahl <mats@sun.com> | 2009-02-09 23:51:59 +0100 |
---|---|---|
committer | Mats Kindahl <mats@sun.com> | 2009-02-09 23:51:59 +0100 |
commit | 8a98664d3b825f7d98d7acd8372079fc6224dfcb (patch) | |
tree | 82b5d2468e08a43e31587af5f72ab6d52e5aff5c /sql/item_xmlfunc.cc | |
parent | bd53d21417e2d340758abfeb29f7057221e0da03 (diff) | |
parent | 86a11e6a39593db66b56013841adb5059c8d1455 (diff) | |
download | mariadb-git-8a98664d3b825f7d98d7acd8372079fc6224dfcb.tar.gz |
Merging with 5.1-bugteam.
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); - } |