summaryrefslogtreecommitdiff
path: root/mysql-test/main/union.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-03-06 09:00:52 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-03-06 09:00:52 +0200
commit2a791c53ad93c8bc1441dd227000234bd49c4990 (patch)
tree4c52ad715c99bd3c6681771d7cb77d451a34e216 /mysql-test/main/union.test
parentb5c72a843abee033e9ea6028e1a109f03afc4455 (diff)
parent723ffdb32ee785cbc511abc457eb70d41c2fcce3 (diff)
downloadmariadb-git-2a791c53ad93c8bc1441dd227000234bd49c4990.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/main/union.test')
-rw-r--r--mysql-test/main/union.test30
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/main/union.test b/mysql-test/main/union.test
index dc9a4617fb3..9d25708611e 100644
--- a/mysql-test/main/union.test
+++ b/mysql-test/main/union.test
@@ -1822,5 +1822,35 @@ SELECT c1 FROM t1 UNION SELECT - @a FROM t2;
drop table t1,t2;
--echo #
+--echo # MDEV-18700: EXPLAIN EXTENDED for query with UNION ALL
+--echo # after INTERSECT/EXCEPT operations
+--echo #
+
+create table t1 (a int);
+insert into t1 values (3), (1), (7), (3), (2), (7), (4);
+
+create table t2 (a int);
+insert into t2 values (4), (5), (9), (1), (8), (9);
+
+create table t3 (a int);
+insert into t3 values (8), (1), (8), (2), (3), (7), (2);
+
+explain extended
+select * from t2 where a < 5
+intersect
+select * from t3 where a < 5
+union all
+select * from t1 where a > 4;
+
+explain extended
+select * from t2 where a < 5
+except
+select * from t3 where a < 5
+union all
+select * from t1 where a > 4;
+
+drop table t1,t2,t3;
+
+--echo #
--echo # End of 10.3 tests
--echo #