~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/insert.result

  • Committer: Monty Taylor
  • Date: 2008-09-16 00:00:48 UTC
  • mto: This revision was merged to the branch mainline in revision 391.
  • Revision ID: monty@inaugust.com-20080916000048-3rvrv3gv9l0ad3gs
Fixed copyright headers in drizzled/

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
6
15
15
drop table t1;
16
16
create table t1 (id int not null auto_increment primary key, username varchar(32) not null, unique (username));
17
 
insert into t1 values (NULL,"mysql");
18
 
insert into t1 values (NULL,"mysql ab");
19
 
insert into t1 values (NULL,"mysql a");
20
 
insert into t1 values (NULL,"r1manic");
21
 
insert into t1 values (NULL,"r1man");
 
17
insert into t1 values (0,"mysql");
 
18
insert into t1 values (0,"mysql ab");
 
19
insert into t1 values (0,"mysql a");
 
20
insert into t1 values (0,"r1manic");
 
21
insert into t1 values (0,"r1man");
22
22
drop table t1;
23
 
create table t1 (a int not null auto_increment, primary key (a), t timestamp null, c char(10) default "hello", i int);
24
 
insert into t1 values (default,default,default,default);
25
 
insert into t1 values (default,default,default,default);
26
 
insert into t1 values (4,0,"a",5);
27
 
ERROR HY000: Received an invalid timestamp value '0'.
28
 
insert into t1 values (default,default,default,default);
29
 
select a,t is not null,c,i from t1;
30
 
a       t is not null   c       i
31
 
1       0       hello   NULL
32
 
2       0       hello   NULL
33
 
3       0       hello   NULL
 
23
create table t1 (a int not null auto_increment, primary key (a), t timestamp, c char(10) default "hello", i int);
 
24
insert into t1 values (default,default,default,default), (default,default,default,default), (4,0,"a",5),(default,default,default,default);
 
25
select a,t>0,c,i from t1;
 
26
a       t>0     c       i
 
27
1       1       hello   NULL
 
28
2       1       hello   NULL
 
29
4       0       a       5
 
30
5       1       hello   NULL
34
31
truncate table t1;
35
32
insert into t1 set a=default,t=default,c=default;
36
33
insert into t1 set a=default,t=default,c=default,i=default;
37
 
insert into t1 set a=4,t= NULL,c="a",i=5;
38
 
insert into t1 set a=5,t= NULL,c="a",i=null;
 
34
insert into t1 set a=4,t=0,c="a",i=5;
 
35
insert into t1 set a=5,t=0,c="a",i=null;
39
36
insert into t1 set a=default,t=default,c=default,i=default;
40
 
select a,t is not null,c,i from t1;
41
 
a       t is not null   c       i
42
 
1       0       hello   NULL
43
 
2       0       hello   NULL
 
37
select a,t>0,c,i from t1;
 
38
a       t>0     c       i
 
39
1       1       hello   NULL
 
40
2       1       hello   NULL
44
41
4       0       a       5
45
42
5       0       a       NULL
46
 
6       0       hello   NULL
 
43
6       1       hello   NULL
47
44
drop table t1;
48
45
create table t1 (id int NOT NULL DEFAULT 8);
49
46
insert into t1 values(NULL);
56
53
create table t1 (email varchar(50));
57
54
insert into t1 values ('sasha@mysql.com'),('monty@mysql.com'),('foo@hotmail.com'),('foo@aol.com'),('bar@aol.com');
58
55
create table t2(id int not null auto_increment primary key, t2 varchar(50), unique(t2));
59
 
insert into t2 (t2) select distinct substring(email, locate('@', email)+1) from t1;
 
56
insert delayed into t2 (t2) select distinct substring(email, locate('@', email)+1) from t1;
60
57
select * from t2;
61
58
id      t2
62
59
1       mysql.com
77
74
count(*)
78
75
500
79
76
insert into  t2 select t1.* from t1, t2 t, t3 where  t1.id1 = t.id2 and t.id2 = t3.id3;
80
 
ERROR HY000: Temporary table too large, rerun with SQL_BIG_RESULT.
81
 
insert into  t2 select SQL_BIG_RESULT t1.* from t1, t2 t, t3 where  t1.id1 = t.id2 and t.id2 = t3.id3;
82
77
select count(*) from t2;
83
78
count(*)
84
79
25500
85
 
COMMIT;
86
80
drop table t1,t2,t3;
87
81
create table t1 (a int, b int);
88
82
insert into t1 (a,b) values (a,b);