summaryrefslogtreecommitdiff
path: root/mysql-test/r/union.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/union.result')
-rw-r--r--mysql-test/r/union.result25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index da89c7ce386..44a3812725a 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -1562,4 +1562,29 @@ DESC t6;
Field Type Null Key Default Extra
NULL int(11) YES NULL
DROP TABLE t1, t2, t3, t4, t5, t6;
+CREATE TABLE t1 (f FLOAT(9,6));
+CREATE TABLE t2 AS SELECT f FROM t1 UNION SELECT f FROM t1;
+SHOW FIELDS FROM t2;
+Field Type Null Key Default Extra
+f float(9,6) YES NULL
+DROP TABLE t1, t2;
+CREATE TABLE t1(d DOUBLE(9,6));
+CREATE TABLE t2 AS SELECT d FROM t1 UNION SELECT d FROM t1;
+SHOW FIELDS FROM t2;
+Field Type Null Key Default Extra
+d double(9,6) YES NULL
+DROP TABLE t1, t2;
+CREATE TABLE t1(a INT);
+EXPLAIN EXTENDED
+SELECT a FROM t1
+UNION
+SELECT a FROM t1
+ORDER BY a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found
+2 UNION t1 system NULL NULL NULL NULL 0 0.00 const row not found
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
+Warnings:
+Note 1003 select '0' AS `a` from `test`.`t1` union select '0' AS `a` from `test`.`t1` order by `a`
+DROP TABLE t1;
End of 5.0 tests