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.2193 06/06/19 11:18:05 bar@stripped +3 -0
Merge mysql.com:/usr/home/bar/mysql-5.1-new.b18201
into mysql.com:/usr/home/bar/mysql-5.1-kt
sql/item_xmlfunc.cc
1.17 06/06/19 11:17:55 bar@stripped +0 -0
Auto merged
mysql-test/t/xml.test
1.15 06/06/19 11:17:55 bar@stripped +0 -0
Auto merged
mysql-test/r/xml.result
1.15 06/06/19 11:17:55 bar@stripped +0 -0
Auto merged
# 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-kt/RESYNC
--- 1.14/mysql-test/r/xml.result 2006-05-02 14:10:05 +05:00
+++ 1.15/mysql-test/r/xml.result 2006-06-19 11:17:55 +05:00
@@ -695,3 +695,12 @@ CALL p2();
EXTRACTVALUE(p,'/Ñ/r')
A
DROP PROCEDURE p2;
+select extractValue('<ns:element xmlns:ns="myns"/>','count(ns:element)');
+extractValue('<ns:element xmlns:ns="myns"/>','count(ns:element)')
+1
+select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element');
+extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element')
+a
+select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns');
+extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns')
+myns
--- 1.14/mysql-test/t/xml.test 2006-05-02 14:10:05 +05:00
+++ 1.15/mysql-test/t/xml.test 2006-06-19 11:17:55 +05:00
@@ -346,3 +346,11 @@ END//
DELIMITER ;//
CALL p2();
DROP PROCEDURE p2;
+
+#
+# Bug#18170: XML: ExtractValue():
+# XPath expression can't use QNames (colon in names)
+#
+select extractValue('<ns:element xmlns:ns="myns"/>','count(ns:element)');
+select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element');
+select extractValue('<ns:element xmlns:ns="myns">a</ns:element>','/ns:element/@xmlns:ns');
--- 1.16/sql/item_xmlfunc.cc 2006-05-02 14:10:05 +05:00
+++ 1.17/sql/item_xmlfunc.cc 2006-06-19 11:17:55 +05:00
@@ -2281,6 +2281,30 @@ static int my_xpath_parse_Number(MY_XPAT
/*
+ QName grammar can be found in a separate document
+ http://www.w3.org/TR/REC-xml-names/#NT-QName
+
+ [6] QName ::= (Prefix ':')? LocalPart
+ [7] Prefix ::= NCName
+ [8] LocalPart ::= NCName
+*/
+static int
+my_xpath_parse_QName(MY_XPATH *xpath)
+{
+ const char *beg;
+ if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_IDENT))
+ return 0;
+ beg= xpath->prevtok.beg;
+ if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_COLON))
+ return 1; /* Non qualified name */
+ if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_IDENT))
+ return 0;
+ xpath->prevtok.beg= beg;
+ return 1;
+}
+
+
+/*
Scan Variable reference
SYNOPSYS
@@ -2313,7 +2337,7 @@ my_xpath_parse_VariableReference(MY_XPAT
static int
my_xpath_parse_NodeTest_QName(MY_XPATH *xpath)
{
- if (!my_xpath_parse_term(xpath, MY_XPATH_LEX_IDENT))
+ if (!my_xpath_parse_QName(xpath))
return 0;
DBUG_ASSERT(xpath->context);
uint len= xpath->prevtok.end - xpath->prevtok.beg;
| Thread |
|---|
| • bk commit into 5.1 tree (bar:1.2193) | bar | 19 Jun |