summaryrefslogtreecommitdiff
path: root/mysql-test/r/derived.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/derived.result')
-rw-r--r--mysql-test/r/derived.result27
1 files changed, 17 insertions, 10 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index bfd4c544131..5f405d83fa5 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -3,9 +3,9 @@ select * from (select 2 from DUAL) b;
2
2
SELECT 1 as a FROM (SELECT 1 UNION SELECT a) b;
-Unknown column 'a' in 'field list'
+ERROR 42S22: Unknown column 'a' in 'field list'
SELECT 1 as a FROM (SELECT a UNION SELECT 1) b;
-Unknown column 'a' in 'field list'
+ERROR 42S22: Unknown column 'a' in 'field list'
CREATE TABLE t1 (a int not null, b char (10) not null);
insert into t1 values(1,'a'),(2,'b'),(3,'c'),(3,'c');
CREATE TABLE t2 (a int not null, b char (10) not null);
@@ -25,18 +25,18 @@ a y
3 3
3 3
SELECT a FROM (SELECT 1 FROM (SELECT 1) a HAVING a=1) b;
-Unknown column 'a' in 'having clause'
+ERROR 42S22: Unknown column 'a' in 'having clause'
SELECT a,b as a FROM (SELECT '1' as a,'2' as b) b HAVING a=1;
-Column: 'a' in having clause is ambiguous
+ERROR 23000: Column: 'a' in having clause is ambiguous
SELECT a,2 as a FROM (SELECT '1' as a) b HAVING a=2;
a a
1 2
SELECT a,2 as a FROM (SELECT '1' as a) b HAVING a=1;
a a
SELECT 1 FROM (SELECT 1) a WHERE a=2;
-Unknown column 'a' in 'where clause'
+ERROR 42S22: Unknown column 'a' in 'where clause'
SELECT (SELECT 1) as a FROM (SELECT 1 FROM t1 HAVING a=1) as a;
-Unknown column 'a' in 'having clause'
+ERROR 42S22: Unknown column 'a' in 'having clause'
select * from t1 as x1, (select * from t1) as x2;
a b a b
1 a 1 a
@@ -146,10 +146,17 @@ select * from (select 1 as a) b left join (select 2 as a) c using(a);
a a
1 NULL
SELECT * FROM (SELECT 1 UNION SELECT a) b;
-Unknown column 'a' in 'field list'
+ERROR 42S22: Unknown column 'a' in 'field list'
SELECT 1 as a FROM (SELECT a UNION SELECT 1) b;
-Unknown column 'a' in 'field list'
+ERROR 42S22: Unknown column 'a' in 'field list'
SELECT 1 as a FROM (SELECT 1 UNION SELECT a) b;
-Unknown column 'a' in 'field list'
+ERROR 42S22: Unknown column 'a' in 'field list'
select 1 from (select 2) a order by 0;
-Unknown column '0' in 'order clause'
+ERROR 42S22: Unknown column '0' in 'order clause'
+create table t1 (id int);
+insert into t1 values (1),(2),(3);
+describe select * from (select * from t1 group by id) bar;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3
+2 DERIVED t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
+drop table t1;