summaryrefslogtreecommitdiff
path: root/mysql-test/r/union.result
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-11-19 17:23:39 +0100
committerSergei Golubchik <sergii@pisem.net>2014-11-19 17:23:39 +0100
commit3495801e2e94df5a10cae6e056f65defa038a6b6 (patch)
treede524b4bf45dbc19a95262843f2b72d0f5adb7bc /mysql-test/r/union.result
parentdf7b27f1fe308fd4011fa020bebd7c69bcd43383 (diff)
parent496fda66fdc34b447ef4dec26d1250b034a321e3 (diff)
downloadmariadb-git-3495801e2e94df5a10cae6e056f65defa038a6b6.tar.gz
5.5 merge
Diffstat (limited to 'mysql-test/r/union.result')
-rw-r--r--mysql-test/r/union.result20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 4ecac34d9fa..40f5a77e3d0 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -1935,3 +1935,23 @@ id select_type table type possible_keys key key_len ref rows Extra
3 UNION t1 ALL NULL NULL NULL NULL 4
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
drop table t1;
+#
+# MDEV-6868:MariaDB server crash ( select with union and order by
+# with subquery )
+#
+CREATE TABLE t1 ( id INTEGER, sample_name1 VARCHAR(100), sample_name2 VARCHAR(100), PRIMARY KEY(id) );
+INSERT INTO t1 ( id, sample_name1, sample_name2 ) VALUES ( 1, 'aaaa', 'bbbb' ), ( 2, 'cccc', 'dddd' );
+(
+SELECT sample_name1 AS testname FROM t1
+)
+UNION
+(
+SELECT sample_name2 AS testname FROM t1 C ORDER BY (SELECT T.sample_name1 FROM t1 T WHERE T.id = C.id)
+)
+;
+testname
+aaaa
+cccc
+bbbb
+dddd
+drop table t1;