summaryrefslogtreecommitdiff
path: root/mysql-test/t/xml.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2013-10-02 15:04:07 +0400
committerAlexander Barkov <bar@mnogosearch.org>2013-10-02 15:04:07 +0400
commit0b6c4bb34f99b8f4023fd0bef25a1b714f96b699 (patch)
tree87e5f83097f30c9fb7e30928800bcc92690f6bbd /mysql-test/t/xml.test
parent9538bbfce9055f99529adb461d101b7b236eb5a3 (diff)
downloadmariadb-git-0b6c4bb34f99b8f4023fd0bef25a1b714f96b699.tar.gz
MDEV-4928 Merge collation customization improvements
Merging the following MySQL-5.6 changes: - WL#5624: Collation customization improvements http://dev.mysql.com/worklog/task/?id=5624 - WL#4013: Unicode german2 collation http://dev.mysql.com/worklog/task/?id=4013 - Bug#62429 XML: ExtractValue, UpdateXML max arg length 127 chars http://bugs.mysql.com/bug.php?id=62429 (required by WL#5624)
Diffstat (limited to 'mysql-test/t/xml.test')
-rw-r--r--mysql-test/t/xml.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test
index b36bd2067cc..cdc6bd6f91e 100644
--- a/mysql-test/t/xml.test
+++ b/mysql-test/t/xml.test
@@ -673,6 +673,35 @@ SELECT UPDATEXML('<a><c><a>x</a></c></a>','(a)/a','<b />');
SELECT UPDATEXML('<a><c><a>x</a></c></a>','(a)//a','<b />');
SELECT ExtractValue('<a><a>aa</a><b>bb</b></a>','(a)/a|(a)/b');
+
+--echo #
+--echo # Bug#62429 XML: ExtractValue, UpdateXML max arg length 127 chars
+--echo #
+CREATE TABLE t1 (id INT AUTO_INCREMENT, txt VARCHAR(1000), PRIMARY KEY(id));
+
+INSERT INTO t1 (txt) VALUES
+(CONCAT('<', REPEAT('a',127), '>127</', REPEAT('a',127), '>')),
+(CONCAT('<', REPEAT('a',128), '>128</', REPEAT('a',128), '>')),
+(CONCAT('<', REPEAT('a',63), '><', REPEAT('b',63), '>63/63</', REPEAT('b',63), '></', REPEAT('a',63),'>')),
+(CONCAT('<', REPEAT('a',63), '><', REPEAT('b',64), '>63/64</', REPEAT('b',64), '></', REPEAT('a',63),'>'));
+
+--vertical_results
+SELECT
+ txt,
+ EXTRACTVALUE(txt, CONCAT('/', REPEAT('a', 127))) as a127,
+ EXTRACTVALUE(txt, CONCAT('/', REPEAT('a', 128))) as a128,
+ EXTRACTVALUE(txt, CONCAT('//', REPEAT('b', 63))) as a63b63,
+ EXTRACTVALUE(txt, CONCAT('//', REPEAT('b', 64))) as a63b64
+FROM t1;
+SELECT UPDATEXML(txt, CONCAT('//', REPEAT('b', 63)), '63/63+') FROM t1;
+DROP TABLE t1;
+
+# This will call my_str_realloc_mysqld()
+CREATE TABLE t1 (a TEXT);
+INSERT INTO t1 VALUES (CONCAT('<a><', REPEAT('b',128),'>b128</',REPEAT('b',128),'><',REPEAT('c',512),'>c512</',REPEAT('c',512),'></a>'));
+SELECT ExtractValue (a, CONCAT('//',REPEAT('c',512))) AS c512 FROM t1;
+DROP TABLE t1;
+
--echo #
--echo # End of 5.5 tests
--echo #