~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/join.result

  • Committer: Lee Bieber
  • Date: 2010-12-02 18:56:33 UTC
  • mfrom: (1966.3.1 bug683842)
  • mto: This revision was merged to the branch mainline in revision 1969.
  • Revision ID: kalebral@gmail.com-20101202185633-e27o1zhpev18dlsn
Merge Monty - fix bug 683842: remove generic catch blocks       

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);
72
74
count int DEFAULT '0' NOT NULL,
73
75
qty int,
74
76
phone char(1) DEFAULT '' NOT NULL,
75
 
timestamp_arg datetime,
 
77
timestamp datetime,
76
78
PRIMARY KEY (id),
77
79
KEY token (token(15)),
78
 
KEY timestamp_arg (timestamp_arg),
 
80
KEY timestamp (timestamp),
79
81
UNIQUE token_2 (token(75),count,phone)
80
82
);
81
83
INSERT INTO t1 VALUES (21,'e45703b64de71482360de8fec94c3ade',3,7800,'n','1999-12-23 17:22:21');
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