~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/join.result

  • Committer: Brian Aker
  • Date: 2011-02-09 22:48:12 UTC
  • mto: (2154.2.1 drizzle-build)
  • mto: This revision was merged to the branch mainline in revision 2161.
  • Revision ID: brian@tangent.org-20110209224812-n7f7as4eflzk2r7l
Merge in header fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
INSERT INTO t1 VALUES (1);
5
5
INSERT INTO t2 VALUES (2);
6
6
SELECT * FROM t1 JOIN t2;
7
 
ERROR HY000: Implicit cartesian join attempted.
 
7
S1      S1
 
8
1       2
8
9
SELECT * FROM t1 INNER JOIN t2;
9
 
ERROR HY000: Implicit cartesian join attempted.
 
10
S1      S1
 
11
1       2
10
12
SELECT * from t1 JOIN t2 USING (S1);
11
13
S1
12
14
SELECT * FROM t1 INNER JOIN t2 USING (S1);
297
299
CREATE TABLE t2 (b int);
298
300
CREATE TABLE t3 (c int);
299
301
SELECT * FROM t1 NATURAL JOIN t2 NATURAL JOIN t3;
300
 
ERROR HY000: Implicit cartesian join attempted.
 
302
a       b       c
301
303
DROP TABLE t1, t2, t3;
302
304
create table t1 (i int);
303
305
create table t2 (i int);
772
774
create table t2 (a int, b int, filler char(100), key(a), key(b));
773
775
create table t3 (a int, b int, filler char(100), key(a), key(b));
774
776
insert into t2 
775
 
select @a:= A.a + 10*(B.a + 10*C.a), @a, 'filler' from t1 A, t1 B, t1 C where B.a >= 0;
 
777
select @a:= A.a + 10*(B.a + 10*C.a), @a, 'filler' from t1 A, t1 B, t1 C;
776
778
insert into t3 select * from t2 where a < 800;
777
779
drop table t1, t2, t3;
778
780
create table t1 (a int);
779
781
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
780
782
create table t2 (a int, b int, primary key(a));
781
 
insert into t2 select @v:=A.a+10*B.a, @v  from t1 A, t1 B where B.a >= 0;
 
783
insert into t2 select @v:=A.a+10*B.a, @v  from t1 A, t1 B;
782
784
explain select * from t1;
783
785
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
784
786
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    10