diff options
Diffstat (limited to 'mysql-test/r/union.result')
-rw-r--r-- | mysql-test/r/union.result | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 93e84c731fe..1ac688787c6 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -876,6 +876,8 @@ Slow_queries 1 drop table t1; 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'); +SET @save_optimizer_switch=@@optimizer_switch; +SET optimizer_switch='outer_join_with_cache=off'; 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); NAME PHONE NAME PHONE a 111 NULL NULL @@ -883,6 +885,7 @@ b 222 NULL NULL d 444 d 454 NULL NULL f 666 NULL NULL g 777 +SET optimizer_switch=@save_optimizer_switch; drop table t1; create table t1 (col1 tinyint unsigned, col2 tinyint unsigned); insert into t1 values (1,2),(3,4),(5,6),(7,8),(9,10); |