From c76459aca9beae24b3c2d1e9fea7c3a9c386328c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Mar 2006 14:05:38 +0400 Subject: Bug#16316: XML: extractvalue() is case-sensitive with contains() xml.result, xml.test: Adding test case. item_xmlfunc.cc: Fixed that Item_nodeset_func derived classes didn't take into account charset of the XML value and always worked using "binary" charset. sql/item_xmlfunc.cc: Bug#16316: XML: extractvalue() is case-sensitive with contains() Fixed that Item_nodeset_func derived classes didn't take into account charset of the XML value and always worked using "binary" charset. mysql-test/t/xml.test: Adding test case. mysql-test/r/xml.result: Adding test case. --- sql/item_xmlfunc.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sql/item_xmlfunc.cc') diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index 26c2e84f8dd..8ad7e2f9661 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -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()); -- cgit v1.2.1