Commit 9e001880 authored by pem@mysql.com's avatar pem@mysql.com

Merge mysql.com:/extern/mysql/bk/mysql-5.1-new

into  mysql.com:/extern/mysql/5.1/generic/mysql-5.1-new
parents 48ca79ad 7dc12415
......@@ -561,3 +561,15 @@ A B C
select extractvalue('<A_B>A</A_B>','/A_B');
extractvalue('<A_B>A</A_B>','/A_B')
A
select extractvalue('<a>Jack</a>','/a[contains(../a,"J")]');
extractvalue('<a>Jack</a>','/a[contains(../a,"J")]')
Jack
select extractvalue('<a>Jack</a>','/a[contains(../a,"j")]');
extractvalue('<a>Jack</a>','/a[contains(../a,"j")]')
Jack
select extractvalue('<a>Jack</a>','/a[contains(../a,"j")]' collate latin1_bin);
extractvalue('<a>Jack</a>','/a[contains(../a,"j")]' collate latin1_bin)
select extractvalue('<a>Jack</a>' collate latin1_bin,'/a[contains(../a,"j")]');
extractvalue('<a>Jack</a>' collate latin1_bin,'/a[contains(../a,"j")]')
......@@ -254,3 +254,11 @@ select extractvalue('<a>A<b>B<c>C</c></b></a>','/a/descendant-or-self::*');
# Bug #16320 XML: extractvalue() won't accept names containing underscores
#
select extractvalue('<A_B>A</A_B>','/A_B');
#
# Bug#16316: XML: extractvalue() is case-sensitive with contains()
#
select extractvalue('<a>Jack</a>','/a[contains(../a,"J")]');
select extractvalue('<a>Jack</a>','/a[contains(../a,"j")]');
select extractvalue('<a>Jack</a>','/a[contains(../a,"j")]' collate latin1_bin);
select extractvalue('<a>Jack</a>' collate latin1_bin,'/a[contains(../a,"j")]');
......@@ -206,7 +206,11 @@ public:
return str;
}
enum Item_result result_type () const { return STRING_RESULT; }
void fix_length_and_dec() { max_length= MAX_BLOB_WIDTH; }
void fix_length_and_dec()
{
max_length= MAX_BLOB_WIDTH;
collation.collation= pxml->charset();
}
const char *func_name() const { return "nodeset"; }
};
......@@ -2373,6 +2377,7 @@ void Item_xml_str_func::fix_length_and_dec()
xpath.cs= collation.collation;
xpath.debug= 0;
xpath.pxml= &pxml;
pxml.set_charset(collation.collation);
rc= my_xpath_parse(&xpath, xp->ptr(), xp->ptr() + xp->length());
......
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