summaryrefslogtreecommitdiff
path: root/mysql-test/t/xml.test
diff options
context:
space:
mode:
authorunknown <bar@mysql.com>2006-05-02 14:10:18 +0500
committerunknown <bar@mysql.com>2006-05-02 14:10:18 +0500
commitd3bb4670a9d4b3dfc125b253383534693dc9fa59 (patch)
tree48454b6ff02bd1344f02f9d4a2d2c1c9217433bd /mysql-test/t/xml.test
parentc7a5f503420c56522ccc63fdcac80177e00dabb1 (diff)
parent3010775ed19b6fbbbc2837e5ed8b377266c5533a (diff)
downloadmariadb-git-d3bb4670a9d4b3dfc125b253383534693dc9fa59.tar.gz
Merge mysql.com:/usr/home/bar/mysql-5.1-new
into mysql.com:/usr/home/bar/mysql-5.1-new.b18201 mysql-test/r/xml.result: Auto merged mysql-test/t/xml.test: Auto merged sql/item_xmlfunc.cc: Auto merged
Diffstat (limited to 'mysql-test/t/xml.test')
-rw-r--r--mysql-test/t/xml.test13
1 files changed, 12 insertions, 1 deletions
diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test
index 8a12dbca51d..c9e50e0bf5c 100644
--- a/mysql-test/t/xml.test
+++ b/mysql-test/t/xml.test
@@ -53,7 +53,7 @@ SELECT extractValue(@xml,'/a//@x');
SELECT extractValue(@xml,'/a//@x[1]');
SELECT extractValue(@xml,'/a//@x[2]');
-SET @xml='<a><b>b1</b><b>b2</b><c><b>c1b1</b><b>c1b2</b></c><c><b>c2b1</c></b>/a>';
+SET @xml='<a><b>b1</b><b>b2</b><c><b>c1b1</b><b>c1b2</b></c><c><b>c2b1</c></b></a>';
SELECT extractValue(@xml,'//b[1]');
SELECT extractValue(@xml,'/descendant::b[1]');
@@ -299,6 +299,17 @@ select extractvalue('<a>Jack</a>' collate latin1_bin,'/a[contains(../a,"j")]');
select ExtractValue('<tag1><![CDATA[test]]></tag1>','/tag1');
#
+# Bug#18201: XML: ExtractValue works even if the xml fragment
+# is not well-formed xml
+#
+select extractValue('<a>a','/a');
+select extractValue('<a>a<','/a');
+select extractValue('<a>a</','/a');
+select extractValue('<a>a</a','/a');
+select extractValue('<a>a</a></b>','/a');
+select extractValue('<a b=>a</a>','/a');
+
+#
# Bug #18171 XML: ExtractValue: the XPath position()
# function crashes the server!
#