~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/insert.test

  • Committer: Andrew Hutchings
  • Date: 2010-09-08 19:03:09 UTC
  • mfrom: (1750 staging)
  • mto: (1750.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1751.
  • Revision ID: andrew@linuxjedi.co.uk-20100908190309-mya1nu7xvo1fpvk8
Merge trunk into branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
create table t1 (a int not null auto_increment, primary key (a), t timestamp null, c char(10) default "hello", i int);
34
34
insert into t1 values (default,default,default,default);
35
35
insert into t1 values (default,default,default,default);
36
 
--error 1685 # Bad timestamp
 
36
--error ER_INVALID_UNIX_TIMESTAMP_VALUE # Bad timestamp
37
37
insert into t1 values (4,0,"a",5);
38
38
insert into t1 values (default,default,default,default);
39
39
select a,t is not null,c,i from t1;
116
116
 }
117
117
enable_query_log;
118
118
select count(*) from t2;
119
 
--error 1697
 
119
--error ER_USE_SQL_BIG_RESULT
120
120
insert into  t2 select t1.* from t1, t2 t, t3 where  t1.id1 = t.id2 and t.id2 = t3.id3;
121
121
insert into  t2 select SQL_BIG_RESULT t1.* from t1, t2 t, t3 where  t1.id1 = t.id2 and t.id2 = t3.id3;
122
122
select count(*) from t2;
131
131
insert into t1 SET a=1, b=a+1;
132
132
insert into t1 (a,b) select 1,2;
133
133
INSERT INTO t1 ( a ) SELECT 0 ON DUPLICATE KEY UPDATE a = a + VALUES (a);
134
 
--error 1110
 
134
--error ER_FIELD_SPECIFIED_TWICE
135
135
replace into t1 (a,a) select 100, 'hundred';
136
 
--error 1110
 
136
--error ER_FIELD_SPECIFIED_TWICE
137
137
insert into t1 (a,b,b) values (1,1,1);
138
 
--error 1136
 
138
--error ER_WRONG_VALUE_COUNT_ON_ROW
139
139
insert into t1 (a,a) values (1,1,1);
140
 
--error 1110
 
140
--error ER_FIELD_SPECIFIED_TWICE
141
141
insert into t1 (a,a) values (1,1);
142
 
--error 1110
 
142
--error ER_FIELD_SPECIFIED_TWICE
143
143
insert into t1 SET a=1,b=2,a=1;
144
 
--error 1110
 
144
--error ER_FIELD_SPECIFIED_TWICE
145
145
insert into t1 (b,b) select 1,2;
146
 
--error 1110
 
146
--error ER_FIELD_SPECIFIED_TWICE
147
147
INSERT INTO t1 (b,b) SELECT 0,0 ON DUPLICATE KEY UPDATE a = a + VALUES (a);
148
148
drop table t1;
149
149