summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/subselect.result')
-rw-r--r--mysql-test/r/subselect.result11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index e941c115b2c..dea79868dac 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -42,6 +42,9 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1
3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
2 DERIVED NULL NULL NULL NULL NULL NULL NULL No tables used
+Warnings:
+Note 1271 Field or reference 'a' of SELECT #3 was resolved in SELECT #1
+Note 1271 Field or reference '.a' of SELECT #3 was resolved in SELECT #1
SELECT 1 FROM (SELECT 1 as a) as b HAVING (SELECT a)=1;
1
1
@@ -207,6 +210,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t4 ALL NULL NULL NULL NULL 3
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2
3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 3 Using where
+Warnings:
+Note 1271 Field or reference 't4.a' of SELECT #3 was resolved in SELECT #1
select * from t3 where exists (select * from t2 where t2.b=t3.a);
a
7
@@ -286,6 +291,9 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2
2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 1
3 DEPENDENT UNION t5 ALL NULL NULL NULL NULL 2 Using where
+Warnings:
+Note 1271 Field or reference 't2.a' of SELECT #2 was resolved in SELECT #1
+Note 1271 Field or reference 't2.a' of SELECT #3 was resolved in SELECT #1
select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2;
ERROR 21000: Subselect returns more than 1 record
create table t6 (patient_uq int, clinic_uq int, index i1 (clinic_uq));
@@ -301,6 +309,8 @@ explain select * from t6 where exists (select * from t7 where uq = clinic_uq);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t6 ALL NULL NULL NULL NULL 4 Using where
2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 test.t6.clinic_uq 1
+Warnings:
+Note 1271 Field or reference 'clinic_uq' of SELECT #2 was resolved in SELECT #1
select * from t1 where a= (select a from t2,t4 where t2.b=t4.b);
ERROR 23000: Column: 'a' in field list is ambiguous
drop table if exists t1,t2,t3;
@@ -808,6 +818,7 @@ explain select (select a+1) from t1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3
Warnings:
+Note 1271 Field or reference 'a' of SELECT #2 was resolved in SELECT #1
Note 1247 Select 2 was reduced during optimisation
select (select a+1) from t1;
(select a+1)