summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/union.result5
-rw-r--r--mysql-test/t/union.test1
2 files changed, 6 insertions, 0 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index ef82b414420..76f09d6b330 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -84,6 +84,11 @@ a b
3 c
2 b
1 a
+explain (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc;
+table type possible_keys key key_len ref rows Extra
+t1 ALL NULL NULL NULL NULL 4
+t2 ALL NULL NULL NULL NULL 4 Using filesort
+t1 ALL NULL NULL NULL NULL 4
explain select a,b from t1 union all select a,b from t2;
table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 4
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 086351e9da1..e62ca6d2700 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -20,6 +20,7 @@ select 't1',b,count(*) from t1 group by b UNION select 't2',b,count(*) from t2 g
(select a,b from t1 limit 2) union all (select a,b from t2 order by a) limit 4;
(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1);
(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc;
+explain (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc;
# Test some error conditions with UNION
explain select a,b from t1 union all select a,b from t2;