Below is the list of changes that have just been committed into a local
5.1 repository of bar. When bar does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2209 06/03/02 14:05:38 bar@stripped +3 -0
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.
mysql-test/r/xml.result
1.7 06/03/02 14:04:50 bar@stripped +12 -0
Adding test case.
mysql-test/t/xml.test
1.7 06/03/02 14:04:43 bar@stripped +8 -0
Adding test case.
sql/item_xmlfunc.cc
1.7 06/03/02 14:02:29 bar@stripped +6 -1
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.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: bar
# Host: bar.intranet.mysql.r18.ru
# Root: /usr/home/bar/mysql-5.1-new.b16316
--- 1.6/mysql-test/r/xml.result 2006-03-02 10:42:02 +04:00
+++ 1.7/mysql-test/r/xml.result 2006-03-02 14:04:50 +04:00
@@ -561,3 +561,15 @@
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")]')
+
--- 1.6/mysql-test/t/xml.test 2006-03-02 10:42:02 +04:00
+++ 1.7/mysql-test/t/xml.test 2006-03-02 14:04:43 +04:00
@@ -254,3 +254,11 @@
# 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")]');
--- 1.6/sql/item_xmlfunc.cc 2006-03-02 10:37:58 +04:00
+++ 1.7/sql/item_xmlfunc.cc 2006-03-02 14:02:29 +04:00
@@ -206,7 +206,11 @@
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 @@
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());
| Thread |
|---|
| • bk commit into 5.1 tree (bar:1.2209) BUG#16316 | bar | 2 Mar |