diff options
author | unknown <bell@sanja.is.com.ua> | 2002-09-03 10:06:10 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-09-03 10:06:10 +0300 |
commit | 9dea4a4cd1ac246004dc9d223cfc606a7dea5567 (patch) | |
tree | 47d958e5060fcfc773f2874d7abccdd221a738cf /mysql-test/t | |
parent | 3a9dabd6765e7dad0cbd6949ac275487f72696d2 (diff) | |
parent | 3fbcafea9c5e85dc6315f0b89872ac5e273195c8 (diff) | |
download | mariadb-git-9dea4a4cd1ac246004dc9d223cfc606a7dea5567.tar.gz |
merged
sql/item.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_select.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/subselect.test | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 16ba6c9e602..8b9ed3b89c9 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -1,6 +1,6 @@ select (select 2); -drop table if exists t1,t2,t3,t4,attend,clinic; +drop table if exists t1,t2,t3,t4,t5,attend,clinic; create table t1 (a int); create table t2 (a int, b int); create table t3 (a int); @@ -33,11 +33,18 @@ select b,max(a) as ma from t4 group by b having b < (select max(t2.a) from t2 where t2.b=t4.b); select b,max(a) as ma from t4 group by b having b >= (select max(t2.a) from t2 where t2.b=t4.b); - +create table t5 (a int); +select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; +insert into t5 values (5); +select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; +insert into t5 values (2); +select (select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a), a from t2; +-- error 1230 +select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2; create table attend (patient_uq int, clinic_uq int, index i1 (clinic_uq)); create table clinic( uq int primary key, name char(25)); insert into clinic values(1,"Oblastnaia bolnitsa"),(2,"Bolnitsa Krasnogo Kresta"); insert into attend values (1,1),(1,2),(2,2),(1,3); select * from attend where exists (select * from clinic where uq = clinic_uq); -drop table t1,t2,t3,t4,attend,clinic; +drop table t1,t2,t3,t4,t5,attend,clinic; |