summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2002-09-03 10:06:10 +0300
committerbell@sanja.is.com.ua <>2002-09-03 10:06:10 +0300
commitd9989c635eebba093f6c3489fecdb254ce828985 (patch)
tree47d958e5060fcfc773f2874d7abccdd221a738cf /mysql-test/r
parent6b20a480a651dbed9b05baff5aaab2cb03ea0791 (diff)
parentb07aaeb2956cd93e5cc31568523e0e9fec8e74c0 (diff)
downloadmariadb-git-d9989c635eebba093f6c3489fecdb254ce828985.tar.gz
merged
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/distinct.result3
-rw-r--r--mysql-test/r/subselect.result21
2 files changed, 21 insertions, 3 deletions
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result
index e347a95b037..89f4a8ae7f2 100644
--- a/mysql-test/r/distinct.result
+++ b/mysql-test/r/distinct.result
@@ -92,7 +92,8 @@ NULL NULL NULL
0 0
select id >= 0 and id <= 5 as grp,count(*) from t1 group by grp;
grp count(*)
-0 7
+NULL 1
+0 6
1 6
SELECT DISTINCT FACILITY FROM t1;
FACILITY
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index fb91bebd727..dada87803ad 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -1,7 +1,7 @@
select (select 2);
(select 2)
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);
@@ -82,6 +82,23 @@ select b,max(a) as ma from t4 group by b having b >= (select max(t2.a)
from t2 where t2.b=t4.b);
b ma
7 12
+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;
+(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a) a
+NULL 1
+2 2
+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;
+(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a) a
+NULL 1
+2 2
+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;
+(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a) a
+NULL 1
+2 2
+select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2;
+Subselect return more than 1 record
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");
@@ -91,4 +108,4 @@ patient_uq clinic_uq
1 1
1 2
2 2
-drop table t1,t2,t3,t4,attend,clinic;
+drop table t1,t2,t3,t4,t5,attend,clinic;