summaryrefslogtreecommitdiff
path: root/mysql-test/t/union.test
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2004-05-05 22:30:01 +0300
committerbell@sanja.is.com.ua <>2004-05-05 22:30:01 +0300
commit26f0825cae8e1324c67ba88aa47df60c6ba952a1 (patch)
treee967558b190a889ad77f62e0f69da4f76c0774f6 /mysql-test/t/union.test
parent62fca61bc448219f36bd07e74218356f8a99987f (diff)
parent4e2b94dea6a2cbb92e22d8df5197018dad300c4a (diff)
downloadmariadb-git-26f0825cae8e1324c67ba88aa47df60c6ba952a1.tar.gz
merge
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r--mysql-test/t/union.test7
1 files changed, 3 insertions, 4 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 21619534f49..d9e19571f81 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -469,12 +469,13 @@ show status like 'Slow_queries';
drop table t1;
#
-# bug #2508
+# Column 'name' cannot be null (error with union and left join) (bug #2508)
#
create table t1 ( RID int(11) not null default '0', IID int(11) not null default '0', nada varchar(50) not null,NAME varchar(50) not null,PHONE varchar(50) not null) engine=MyISAM;
insert into t1 ( RID,IID,nada,NAME,PHONE) values (1, 1, 'main', 'a', '111'), (2, 1, 'main', 'b', '222'), (3, 1, 'main', 'c', '333'), (4, 1, 'main', 'd', '444'), (5, 1, 'main', 'e', '555'), (6, 2, 'main', 'c', '333'), (7, 2, 'main', 'd', '454'), (8, 2, 'main', 'e', '555'), (9, 2, 'main', 'f', '666'), (10, 2, 'main', 'g', '777');
select A.NAME, A.PHONE, B.NAME, B.PHONE from t1 A left join t1 B on A.NAME = B.NAME and B.IID = 2 where A.IID = 1 and (A.PHONE <> B.PHONE or B.NAME is null) union select A.NAME, A.PHONE, B.NAME, B.PHONE from t1 B left join t1 A on B.NAME = A.NAME and A.IID = 1 where B.IID = 2 and (A.PHONE <> B.PHONE or A.NAME is null);
drop table t1;
+
#
# Bug #2809 (UNION fails on MyIsam tables when index on second column from
# same table)
@@ -487,10 +488,8 @@ select col1 n from t1 union select col2 n from t1 order by n;
drop table t1;
#
-# Bug #1428, incorrect handling of UNION ALL
-# NOTE: The current result is wrong, needs to be fixed!
+# Incorrect handling of UNION ALL (Bug #1428)
#
-
create table t1 (i int);
insert into t1 values (1);
select * from t1 UNION select * from t1;