diff options
author | unknown <bar@mysql.com> | 2006-03-09 11:53:56 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2006-03-09 11:53:56 +0400 |
commit | 41a863830aa7d7d0a4c0eae87ecb268a60c70149 (patch) | |
tree | d112af938f97483403d7e55fadd1bb01f3c65407 /mysql-test/t/xml.test | |
parent | a4920a66ff987867ee1d28abf0fc0a12f26a8059 (diff) | |
parent | a5694ba4cf36bbb4434d319665831fb25b1c995e (diff) | |
download | mariadb-git-41a863830aa7d7d0a4c0eae87ecb268a60c70149.tar.gz |
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.1-new/
into mysql.com:/usr/home/bar/mysql-5.1-new.b16318
sql/item_xmlfunc.cc:
Auto merged
mysql-test/r/xml.result:
After merge fix
mysql-test/t/xml.test:
After merge fix
Diffstat (limited to 'mysql-test/t/xml.test')
-rw-r--r-- | mysql-test/t/xml.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test index f7ce987f29d..831867937e4 100644 --- a/mysql-test/t/xml.test +++ b/mysql-test/t/xml.test @@ -256,6 +256,21 @@ select extractvalue('<a>A<b>B<c>C</c></b></a>','/a/descendant-or-self::*'); select extractvalue('<A_B>A</A_B>','/A_B'); # +# Bug#16318: XML: extractvalue() incorrectly returns last() = 1 +# +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[position()]'); +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)=last()]'); +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[last()]'); +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[last()-1]'); +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[last()=1]'); +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[last()=2]'); +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[last()=position()]'); +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)]'); +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)-1]'); +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)=1]'); +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)=2]'); +select extractvalue('<a>A<b>B1</b><b>B2</b></a>','/a/b[count(.)=position()]'); +# # Bug#16316: XML: extractvalue() is case-sensitive with contains() # select extractvalue('<a>Jack</a>','/a[contains(../a,"J")]'); |