summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_concat.result
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-10-15 10:57:36 +0400
committerAlexander Barkov <bar@mariadb.com>2018-10-15 10:57:36 +0400
commitae3fe14c17b4982fd576f65dccc5aba2e630cb31 (patch)
tree0cf1b275d6d21d73ed495bd0e54a2ae2a4b3d228 /mysql-test/r/func_concat.result
parentcb4877a50371e02993bd766ac8d92f9c6f5ca8a8 (diff)
downloadmariadb-git-ae3fe14c17b4982fd576f65dccc5aba2e630cb31.tar.gz
Test for MDEV-13119 and MDEV-13120
These bugs: MDEV-13119 Wrong results with CAST(AS CHAR) and subquery MDEV-13120 Wrong results with MAKE_SET() and subquery were previously fixed by: MDEV-13790 UNHEX() of a somewhat complicated CONCAT() returns NULL Adding tests only
Diffstat (limited to 'mysql-test/r/func_concat.result')
-rw-r--r--mysql-test/r/func_concat.result20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/func_concat.result b/mysql-test/r/func_concat.result
index 9ab6f74653e..acde1be051b 100644
--- a/mysql-test/r/func_concat.result
+++ b/mysql-test/r/func_concat.result
@@ -268,3 +268,23 @@ SET optimizer_switch=@save_optimizer_switch;
SELECT UNHEX(CONCAT('414C2', HEX(8 + ROUND(RAND()*7)), SUBSTR(SHA(UUID()),6,33),HEX(2+ROUND(RAND()*8)))) IS NULL AS c1;
c1
0
+#
+# MDEV-13119 Wrong results with CAST(AS CHAR) and subquery
+#
+SET optimizer_switch=_utf8'derived_merge=on';
+CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1);
+INSERT INTO t1 VALUES('abcdefghi');
+SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT CAST(t AS CHAR CHARACTER SET utf8) t2 FROM t1) sub;
+c2
+abcdefghi-abcdefghi
+DROP TABLE t1;
+SET optimizer_switch=@save_optimizer_switch;
+#
+# MDEV-13120 Wrong results with MAKE_SET() and subquery
+#
+CREATE TABLE t1 (t VARCHAR(10) CHARSET latin1);
+INSERT INTO t1 VALUES('abcdefghi');
+SELECT CONCAT(t2,'-',t2) c2 FROM (SELECT MAKE_SET(3,t,t) t2 FROM t1) sub;
+c2
+abcdefghi,abcdefghi-abcdefghi,abcdefghi
+DROP TABLE t1;