~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/join_outer.test

  • Committer: Monty Taylor
  • Date: 2010-08-03 18:21:58 UTC
  • mto: (1680.2.6 build)
  • mto: This revision was merged to the branch mainline in revision 1683.
  • Revision ID: mordred@inaugust.com-20100803182158-nkmgnlohodud4290
Made existence of intltool and gettext optional.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
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);
37
37
 
38
38
# The next query should rearange the left joins to get this to work
39
 
--error ER_BAD_FIELD_ERROR
 
39
--error 1054
40
40
explain select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
41
 
--error ER_BAD_FIELD_ERROR
 
41
--error 1054
42
42
select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
43
43
 
44
44
# The next query should give an error in MySQL
45
 
--error ER_BAD_FIELD_ERROR
 
45
--error 1054
46
46
select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a);
47
47
 
48
48
# Test of inner join
294
294
insert into t4 values (1,1);
295
295
insert into t5 values (1,1);
296
296
 
297
 
--error ER_BAD_FIELD_ERROR
 
297
--error 1054
298
298
explain select * from t3 left join t4 on t4.seq_1_id = t2.t2_id left join t1 on t1.t1_id = t4.seq_0_id left join t5 on t5.seq_0_id = t1.t1_id left join t2 on t2.t2_id = t5.seq_1_id where t3.t3_id = 23;
299
299
 
300
300
drop table t1,t2,t3,t4,t5;
344
344
insert into t2 values (7, 'green');
345
345
select * from t1;
346
346
select * from t2;
347
 
--sorted_result
348
347
select * from t2 natural join t1;
349
 
--sorted_result
350
348
select t2.count, t1.name from t2 natural join t1;
351
 
--sorted_result
352
349
select t2.count, t1.name from t2 inner join t1 using (color);
353
350
drop table t1;
354
351
drop table t2;