summaryrefslogtreecommitdiff
path: root/mysql-test/t/xml.test
diff options
context:
space:
mode:
authorunknown <bar@bar.intranet.mysql.r18.ru>2006-06-19 11:18:05 +0500
committerunknown <bar@bar.intranet.mysql.r18.ru>2006-06-19 11:18:05 +0500
commitca741138e7fa943fdd2afe972731ae2cf4b8d7c6 (patch)
tree7ed87d0cf61ca81ccf1058864cb7459bbeee6b3a /mysql-test/t/xml.test
parent96f83a0d8aef38e60a7bb7bbda81173ac4ca859d (diff)
parentd3bb4670a9d4b3dfc125b253383534693dc9fa59 (diff)
downloadmariadb-git-ca741138e7fa943fdd2afe972731ae2cf4b8d7c6.tar.gz
Merge mysql.com:/usr/home/bar/mysql-5.1-new.b18201
into mysql.com:/usr/home/bar/mysql-5.1-kt 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 65d0a40291f..c20c4cbccc1 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!
#