~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/insert.test

  • Committer: Brian Aker
  • Date: 2010-02-14 01:56:51 UTC
  • mto: (1273.16.5 fix_is)
  • mto: This revision was merged to the branch mainline in revision 1300.
  • Revision ID: brian@gaz-20100214015651-ror9j0xu7dccz0ct
Two fixes for "make dist"

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 ER_INVALID_UNIX_TIMESTAMP_VALUE # Bad timestamp
 
36
--error 1685 # 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 ER_USE_SQL_BIG_RESULT
120
119
insert into  t2 select t1.* from t1, t2 t, t3 where  t1.id1 = t.id2 and t.id2 = t3.id3;
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
120
select count(*) from t2;
123
121
drop table t1,t2,t3;
124
122
 
131
129
insert into t1 SET a=1, b=a+1;
132
130
insert into t1 (a,b) select 1,2;
133
131
INSERT INTO t1 ( a ) SELECT 0 ON DUPLICATE KEY UPDATE a = a + VALUES (a);
134
 
--error ER_FIELD_SPECIFIED_TWICE
 
132
--error 1110
135
133
replace into t1 (a,a) select 100, 'hundred';
136
 
--error ER_FIELD_SPECIFIED_TWICE
 
134
--error 1110
137
135
insert into t1 (a,b,b) values (1,1,1);
138
 
--error ER_WRONG_VALUE_COUNT_ON_ROW
 
136
--error 1136
139
137
insert into t1 (a,a) values (1,1,1);
140
 
--error ER_FIELD_SPECIFIED_TWICE
 
138
--error 1110
141
139
insert into t1 (a,a) values (1,1);
142
 
--error ER_FIELD_SPECIFIED_TWICE
 
140
--error 1110
143
141
insert into t1 SET a=1,b=2,a=1;
144
 
--error ER_FIELD_SPECIFIED_TWICE
 
142
--error 1110
145
143
insert into t1 (b,b) select 1,2;
146
 
--error ER_FIELD_SPECIFIED_TWICE
 
144
--error 1110
147
145
INSERT INTO t1 (b,b) SELECT 0,0 ON DUPLICATE KEY UPDATE a = a + VALUES (a);
148
146
drop table t1;
149
147