~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/update.result

  • Committer: Brian Aker
  • Date: 2009-08-03 23:01:21 UTC
  • mto: (1108.2.1 merge)
  • mto: This revision was merged to the branch mainline in revision 1109.
  • Revision ID: brian@gaz-20090803230121-8wu22sk2x11z558g
Remove multi-update from parser/tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
153
153
id_param        nom_option      valid
154
154
185     test    1
155
155
drop table t1;
156
 
create table t1 (F1 VARCHAR(30), F2 VARCHAR(30), F3 VARCHAR(30), cnt int, groupid int, KEY groupid_index (groupid));
157
 
insert into t1 (F1,F2,F3,cnt,groupid) values ('0','0','0',1,6),
158
 
('0','1','2',1,5), ('0','2','0',1,3), ('1','0','1',1,2),
159
 
('1','2','1',1,1), ('1','2','2',1,1), ('2','0','1',2,4),
160
 
('2','2','0',1,7);
161
 
delete from m1 using t1 m1,t1 m2 where m1.groupid=m2.groupid and (m1.cnt < m2.cnt or m1.cnt=m2.cnt and m1.F3>m2.F3);
162
 
select * from t1;
163
 
F1      F2      F3      cnt     groupid
164
 
0       0       0       1       6
165
 
0       1       2       1       5
166
 
0       2       0       1       3
167
 
1       0       1       1       2
168
 
1       2       1       1       1
169
 
2       0       1       2       4
170
 
2       2       0       1       7
171
 
drop table t1;
172
156
create table t1 (c1 int, c2 char(6), c3 int);
173
157
create table t2 (c1 int, c2 char(6));
174
158
insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20);
189
173
a       b
190
174
0       2
191
175
drop table t1;
192
 
create temporary table t1 (a int, b varchar(10), key b(b(5))) engine=myisam;
193
 
create temporary table t2 (a int, b varchar(10)) engine=myisam;
194
 
insert into t1 values ( 1, 'abcd1e');
195
 
insert into t1 values ( 2, 'abcd2e');
196
 
insert into t2 values ( 1, 'abcd1e');
197
 
insert into t2 values ( 2, 'abcd2e');
198
 
analyze table t1,t2;
199
 
Table   Op      Msg_type        Msg_text
200
 
test.t1 analyze status  OK
201
 
test.t2 analyze status  OK
202
 
update t1, t2 set t1.a = t2.a where t2.b = t1.b;
203
 
show warnings;
204
 
Level   Code    Message
205
 
drop table t1, t2;
206
176
create table t1(f1 int, f2 int);
207
177
create table t2(f3 int, f4 int);
208
178
create index idx on t2(f3);
310
280
2000-01-01
311
281
2002-02-02
312
282
drop table t1;
313
 
create table t1 (f1 int);
314
 
create table t2 (f2 int);
315
 
insert into t1 values(1),(2);
316
 
insert into t2 values(1),(1);
317
 
update t1,t2 set f1=3,f2=3 where f1=f2 and f1=1;
318
 
affected rows: 3
319
 
info: Rows matched: 3  Changed: 3  Warnings: 0
320
 
update t2 set f2=1;
321
 
update t1 set f1=1 where f1=3;
322
 
update t2,t1 set f1=3,f2=3 where f1=f2 and f1=1;
323
 
affected rows: 3
324
 
info: Rows matched: 3  Changed: 3  Warnings: 0
325
 
drop table t1,t2;
326
283
create table t1 (a int);
327
284
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
328
285
create table t2 (a int, filler1 char(200), filler2 char(200), key(a));