summaryrefslogtreecommitdiff
path: root/mysql-test/t/union.test
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-06-03 10:52:36 +0200
committerSergei Golubchik <sergii@pisem.net>2014-06-03 10:52:36 +0200
commit57d15d62f15e8b17eddf0a5e6c4beee8e78c07b1 (patch)
tree9c3afaaf732a6173239d5b4d634ff1d5447428eb /mysql-test/t/union.test
parent5d16592d44d8dd7147ee868c661af842ec0f1568 (diff)
downloadmariadb-git-57d15d62f15e8b17eddf0a5e6c4beee8e78c07b1.tar.gz
Add a test case for MySQL's:
Bug #18167356: EXPLAIN W/ EXISTS(SELECT* UNION SELECT*) WHERE ONE OF SELECT* IS DISTINCT FAILS. the bugfix itself was not merged - MariaDB doesn't have this bug.
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r--mysql-test/t/union.test12
1 files changed, 10 insertions, 2 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index a53427f7fc6..877509a9fc0 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -1274,8 +1274,8 @@ SELECT(SELECT 1 AS a LIMIT 1) AS dev;
SELECT(SELECT 1 AS a FROM dual ORDER BY a DESC LIMIT 1) AS dev;
--echo #
---echo # LP bug#1010729: Unexpected syntax error from UNION
---echo # (bug #54382) with single-table join nest
+--echo # lp:1010729: Unexpected syntax error from UNION
+--echo # (bug #54382) with single-table join nest
--echo #
CREATE TABLE t1 (a int);
CREATE TABLE t2 (b int);
@@ -1292,3 +1292,11 @@ SELECT t1.pk FROM t1 LEFT JOIN (t2) ON (t1.pk = t2.fk);
DROP TABLE t1,t2;
+#
+# Bug #18167356: EXPLAIN W/ EXISTS(SELECT* UNION SELECT*)
+# WHERE ONE OF SELECT* IS DISTINCT FAILS.
+#
+create table t1 (a int);
+insert t1 values (1),(2),(3),(1);
+explain select 1 from dual where exists (select max(a) from t1 group by a union select a+2 from t1);
+drop table t1;