summaryrefslogtreecommitdiff
path: root/mysql-test/r/union.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2014-10-17 12:59:28 -0700
committerIgor Babaev <igor@askmonty.org>2014-10-17 12:59:28 -0700
commita4d1783aaeea6a3e4a46084fde161ff7152fd2da (patch)
tree53114e3a6cd5a3361cc1a092006e40c1153e004c /mysql-test/r/union.result
parent3c4bb0e8720b84a14fe4822d1986d01290b9ab44 (diff)
downloadmariadb-git-a4d1783aaeea6a3e4a46084fde161ff7152fd2da.tar.gz
Fixed bug mdev-6874.
The method subselect_union_engine::no_rows() must take into account the fact that now unit->fake_select_lex is NULL for for select_union_direct objects.
Diffstat (limited to 'mysql-test/r/union.result')
-rw-r--r--mysql-test/r/union.result10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 5cfb7e003d2..ac665bb069b 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -1971,3 +1971,13 @@ FOUND_ROWS()
1
DROP TABLE t1, t2;
# End of WL1763 tests
+#
+# Bug mdev-6874: crash with UNION ALL in a subquery
+#
+CREATE TABLE t1 (a int, b int);
+INSERT INTO t1 VALUES (1,1), (2,8);
+SELECT * FROM t1 t1_1 LEFT JOIN t1 t1_2 ON ( t1_2.b = t1_1.a )
+WHERE t1_2.b NOT IN ( SELECT 4 UNION ALL SELECT 5 );
+a b a b
+1 1 1 1
+DROP TABLE t1;