~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/join_outer.test

  • Committer: Stewart Smith
  • Date: 2009-06-16 03:43:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1094.
  • Revision ID: stewart@flamingspork.com-20090616034300-bamg5dsfaknwi05b
fix join_outer for MyISAM as temp only: 1x open table twice, 1x CREATE TEMP

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
  grp int default NULL,
11
11
  a bigint default NULL,
12
12
  c char(10) NOT NULL default ''
13
 
) ENGINE=MyISAM;
 
13
);
14
14
INSERT INTO t1 VALUES (1,1,'a'),(2,2,'b'),(2,3,'c'),(3,4,'E'),(3,5,'C'),(3,6,'D'),(NULL,NULL,'');
15
15
create table t2 (id int, a bigint not null, c char(10), d int, primary key (a));
16
16
insert into t2 values (1,1,"a",1),(3,4,"A",4),(3,5,"B",5),(3,6,"C",6),(4,7,"D",7);
28
28
select t1.*,t2.* from t1 left join t2 on (t1.a=t2.a) where t2.id=3;
29
29
select t1.*,t2.* from t1 left join t2 on (t1.a=t2.a) where t2.id is null;
30
30
 
 
31
--replace_column 9 #
31
32
explain select t1.*,t2.* from t1,t2 where t1.a=t2.a and isnull(t2.a)=1;
 
33
--replace_column 9 #
32
34
explain select t1.*,t2.* from t1 left join t2 on t1.a=t2.a where isnull(t2.a)=1;
33
35
 
34
36
select t1.*,t2.*,t3.a from t1 left join t2 on (t1.a=t2.a) left join t1 as t3 on (t2.a=t3.a);
537
539
 
538
540
drop table t1, t2;
539
541
 
540
 
CREATE TABLE t1 (
 
542
CREATE TEMPORARY TABLE t1 (
541
543
  ts_id bigint default NULL,
542
544
  inst_id int default NULL,
543
545
  flag_name varchar(64) default NULL,
545
547
  UNIQUE KEY ts_id (ts_id,inst_id,flag_name)
546
548
) ENGINE=MyISAM;
547
549
 
548
 
CREATE TABLE t2 (
 
550
CREATE TEMPORARY TABLE t2 (
549
551
  ts_id bigint default NULL,
550
552
  inst_id int default NULL,
551
553
  flag_name varchar(64) default NULL,