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.result13
1 files changed, 12 insertions, 1 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index 9805b788a73..2c33ffc08d7 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -480,7 +480,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 UNION t2 const PRIMARY PRIMARY 4 const 1 100.00
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL
Warnings:
-Note 1003 (select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` where (`test`.`t1`.`a` = 1)) union (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` where (`test`.`t2`.`a` = 1))
+Note 1003 (select '1' AS `a`,'1' AS `b` from `test`.`t1` where ('1' = 1)) union (select '1' AS `a`,'10' AS `b` from `test`.`t2` where ('1' = 1))
(select * from t1 where a=5) union (select * from t2 where a=1);
a b
1 10
@@ -1426,4 +1426,15 @@ select _utf8'12' union select _latin1'12345';
12
12
12345
+CREATE TABLE t1 (a int);
+INSERT INTO t1 VALUES (3),(1),(2),(4),(1);
+SELECT a FROM (SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a) AS test;
+a
+1
+2
+3
+4
+SELECT a FROM (SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY c) AS test;
+ERROR 42S22: Unknown column 'c' in 'order clause'
+DROP TABLE t1;
End of 5.0 tests