diff options
Diffstat (limited to 'mysql-test/r/xml.result')
-rw-r--r-- | mysql-test/r/xml.result | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index 06dc2f3d78a..21e8f804192 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -132,7 +132,7 @@ xb1 xc1 SELECT extractValue(@xml,'/a//@x[2]'); extractValue(@xml,'/a//@x[2]') xb2 xc2 -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]'); extractValue(@xml,'//b[1]') b1 c1b1 c2b1 @@ -636,6 +636,36 @@ extractvalue('<a>Jack</a>' collate latin1_bin,'/a[contains(../a,"j")]') select ExtractValue('<tag1><![CDATA[test]]></tag1>','/tag1'); ExtractValue('<tag1><![CDATA[test]]></tag1>','/tag1') test +select extractValue('<a>a','/a'); +extractValue('<a>a','/a') +NULL +Warnings: +Warning 1512 Incorrect XML value: 'parse error at line 1 pos 5: unexpected END-OF-INPUT' +select extractValue('<a>a<','/a'); +extractValue('<a>a<','/a') +NULL +Warnings: +Warning 1512 Incorrect XML value: 'parse error at line 1 pos 6: END-OF-INPUT unexpected (ident or '/' wanted)' +select extractValue('<a>a</','/a'); +extractValue('<a>a</','/a') +NULL +Warnings: +Warning 1512 Incorrect XML value: 'parse error at line 1 pos 7: END-OF-INPUT unexpected (ident wanted)' +select extractValue('<a>a</a','/a'); +extractValue('<a>a</a','/a') +NULL +Warnings: +Warning 1512 Incorrect XML value: 'parse error at line 1 pos 8: END-OF-INPUT unexpected ('>' wanted)' +select extractValue('<a>a</a></b>','/a'); +extractValue('<a>a</a></b>','/a') +NULL +Warnings: +Warning 1512 Incorrect XML value: 'parse error at line 1 pos 12: '</b>' unexpected (END-OF-INPUT wanted)' +select extractValue('<a b=>a</a>','/a'); +extractValue('<a b=>a</a>','/a') +NULL +Warnings: +Warning 1512 Incorrect XML value: 'parse error at line 1 pos 7: '>' unexpected (ident or string wanted)' select extractValue('<e>1</e>','position()'); ERROR HY000: XPATH syntax error: '' select extractValue('<e>1</e>','last()'); |