Commit 04bdb1b3 authored by unknown's avatar unknown

Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  mysql.com:/usr/home/bar/mysql-5.1-new.16313
parents 5733d916 1cb4810a
...@@ -544,3 +544,5 @@ extractvalue('<a>a<b>B</b></a>','a|/b') ...@@ -544,3 +544,5 @@ extractvalue('<a>a<b>B</b></a>','a|/b')
a a
select extractvalue('<a>A</a>','/<a>'); select extractvalue('<a>A</a>','/<a>');
ERROR HY000: XPATH syntax error: '>' ERROR HY000: XPATH syntax error: '>'
select extractvalue('<a><b>b</b><b!>b!</b!></a>','//b!');
ERROR HY000: XPATH syntax error: '!'
...@@ -237,3 +237,9 @@ select extractvalue('<a>a<b>B</b></a>','a|/b'); ...@@ -237,3 +237,9 @@ select extractvalue('<a>a<b>B</b></a>','a|/b');
# #
--error 1105 --error 1105
select extractvalue('<a>A</a>','/<a>'); select extractvalue('<a>A</a>','/<a>');
#
# Bug#16313 XML: extractvalue() ignores '!' in names
#
--error 1105
select extractvalue('<a><b>b</b><b!>b!</b!></a>','//b!');
...@@ -1976,8 +1976,17 @@ static int my_xpath_parse_AndExpr(MY_XPATH *xpath) ...@@ -1976,8 +1976,17 @@ static int my_xpath_parse_AndExpr(MY_XPATH *xpath)
*/ */
static int my_xpath_parse_ne(MY_XPATH *xpath) static int my_xpath_parse_ne(MY_XPATH *xpath)
{ {
return my_xpath_parse_term(xpath, MY_XPATH_LEX_EXCL) && MY_XPATH_LEX prevtok= xpath->prevtok;
my_xpath_parse_term(xpath, MY_XPATH_LEX_EQ); if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_EXCL))
return 0;
if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_EQ))
{
/* Unget the exclamation mark */
xpath->lasttok= xpath->prevtok;
xpath->prevtok= prevtok;
return 0;
}
return 1;
} }
static int my_xpath_parse_EqualityOperator(MY_XPATH *xpath) static int my_xpath_parse_EqualityOperator(MY_XPATH *xpath)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment