~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/join.result

  • Committer: lbieber
  • Date: 2010-10-06 16:34:16 UTC
  • mfrom: (1816.1.3 build)
  • Revision ID: lbieber@orisndriz08-20101006163416-ea0sl59qgpglk21y
Merge Monty - Change the requirement from either libinnodb to libhaildb. Also, tied it to version 2.2
Merge Andrew - fix bug 650935: remove --compress from all clients
Merge Andrew - fix bug 653471: Add -A to drizzle client
Merge Travis - 621861 = To change C structs to C++ classes in Drizzle

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');
160
162
d
161
163
NULL
162
164
SELECT * FROM t1 WHERE 1/0 IS NULL;
163
 
ERROR 22012: Division by 0
 
165
d
 
166
2001-08-01
 
167
NULL
 
168
Warnings:
 
169
Error   1365    Division by 0
 
170
Error   1365    Division by 0
 
171
Error   1365    Division by 0
164
172
DROP TABLE t1,t2;
165
173
CREATE TABLE t1 (
166
174
Document_ID varchar(50) NOT NULL default '',
297
305
CREATE TABLE t2 (b int);
298
306
CREATE TABLE t3 (c int);
299
307
SELECT * FROM t1 NATURAL JOIN t2 NATURAL JOIN t3;
300
 
ERROR HY000: Implicit cartesian join attempted.
 
308
a       b       c
301
309
DROP TABLE t1, t2, t3;
302
310
create table t1 (i int);
303
311
create table t2 (i int);
772
780
create table t2 (a int, b int, filler char(100), key(a), key(b));
773
781
create table t3 (a int, b int, filler char(100), key(a), key(b));
774
782
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;
 
783
select @a:= A.a + 10*(B.a + 10*C.a), @a, 'filler' from t1 A, t1 B, t1 C;
776
784
insert into t3 select * from t2 where a < 800;
777
785
drop table t1, t2, t3;
778
786
create table t1 (a int);
779
787
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
780
788
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;
 
789
insert into t2 select @v:=A.a+10*B.a, @v  from t1 A, t1 B;
782
790
explain select * from t1;
783
791
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
784
792
1       SIMPLE  t1      ALL     NULL    NULL    NULL    NULL    10