~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/join.test

  • Committer: Brian Aker
  • Date: 2011-02-01 02:51:01 UTC
  • mto: (2132.1.1 drizzle-build)
  • mto: This revision was merged to the branch mainline in revision 2134.
  • Revision ID: brian@tangent.org-20110201025101-yaj5kkdk2towo6ou
Merge in error message rework. Many error messages are fixed in this patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
CREATE TABLE t2 (S1 INT);
13
13
INSERT INTO t1 VALUES (1);
14
14
INSERT INTO t2 VALUES (2);
15
 
--error ER_CARTESIAN_JOIN_ATTEMPTED
16
15
SELECT * FROM t1 JOIN t2;
17
 
--error ER_CARTESIAN_JOIN_ATTEMPTED
18
16
SELECT * FROM t1 INNER JOIN t2;
19
17
SELECT * from t1 JOIN t2 USING (S1);
20
18
SELECT * FROM t1 INNER JOIN t2 USING (S1);
301
299
CREATE TABLE t1 (a int);
302
300
CREATE TABLE t2 (b int);
303
301
CREATE TABLE t3 (c int);
304
 
--error ER_CARTESIAN_JOIN_ATTEMPTED
305
302
SELECT * FROM t1 NATURAL JOIN t2 NATURAL JOIN t3;
306
303
DROP TABLE t1, t2, t3;
307
304
 
601
598
create table t3 (a int, b int, filler char(100), key(a), key(b));
602
599
 
603
600
insert into t2 
604
 
  select @a:= A.a + 10*(B.a + 10*C.a), @a, 'filler' from t1 A, t1 B, t1 C where B.a >= 0;
 
601
  select @a:= A.a + 10*(B.a + 10*C.a), @a, 'filler' from t1 A, t1 B, t1 C;
605
602
insert into t3 select * from t2 where a < 800;
606
603
 
607
604
# The order of tables must be t2,t3:
615
612
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
616
613
 
617
614
create table t2 (a int, b int, primary key(a));
618
 
insert into t2 select @v:=A.a+10*B.a, @v  from t1 A, t1 B where B.a >= 0;
 
615
insert into t2 select @v:=A.a+10*B.a, @v  from t1 A, t1 B;
619
616
 
620
617
explain select * from t1;
621
618
--replace_column 2 #