summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2002-07-31 01:26:51 +0300
committerunknown <bell@sanja.is.com.ua>2002-07-31 01:26:51 +0300
commitf0f5a892039cb1155608c8c84854b20e93112dc4 (patch)
treeec21674c5640a976a2c4361aa617b56f80082d0b /mysql-test/t
parent8059cfabe04f97bc7acbf2b88de9306f1c5651cd (diff)
downloadmariadb-git-f0f5a892039cb1155608c8c84854b20e93112dc4.tar.gz
fixed bug reported by Walrus & Miguel in exists subselect
mysql-test/r/subselect.result: added test suite of EXISTS clause mysql-test/t/subselect.test: added test suite of EXISTS clause sql/item_subselect.cc: added checking out of memory fixed bug in exists subselect
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/subselect.test11
1 files changed, 9 insertions, 2 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 7b1ebdcbc27..16ba6c9e602 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;
+drop table if exists t1,t2,t3,t4,attend,clinic;
create table t1 (a int);
create table t2 (a int, b int);
create table t3 (a int);
@@ -33,4 +33,11 @@ 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);
-drop table t1,t2,t3,t4;
+
+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;