~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to tests/t/insert.test

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

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