~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/update.test

  • Committer: Brian Aker
  • Date: 2009-08-04 02:33:47 UTC
  • mto: (1108.2.1 merge)
  • mto: This revision was merged to the branch mainline in revision 1109.
  • Revision ID: brian@gaz-20090804023347-z0ciilv9f2exhlws
Removal multi-update/delete

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
drop table t1;
117
117
 
118
118
#
119
 
# Bug #6054 
120
 
#
121
 
create table t1 (c1 int, c2 char(6), c3 int);
122
 
create table t2 (c1 int, c2 char(6));
123
 
insert into t1 values (1, "t1c2-1", 10), (2, "t1c2-2", 20);
124
 
update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1";
125
 
update t1 left join t2 on t1.c1 = t2.c1 set t2.c2 = "t2c2-1" where t1.c3 = 10;
126
 
drop table t1, t2;
127
 
 
128
 
#
129
119
# Bug #8057
130
120
#
131
121
create table t1 (id int not null auto_increment primary key, id_str varchar(32));
328
318
# Check that the number of matched rows is correct when the temporary
329
319
# table is small enough to not be converted to MyISAM
330
320
select count(*) from t1 join t2 on (t1.a=t2.a);
331
 
--enable_info
332
 
update t1 join t2 on (t1.a=t2.a) set t1.id=t2.id;
333
 
--disable_info
334
321
 
335
322
# Increase table sizes
336
323
insert into t2(a) select a from t2; 
341
328
# Check that the number of matched rows is correct when the temporary
342
329
# table has to be converted to MyISAM
343
330
select count(*) from t1 join t2 on (t1.a=t2.a);
344
 
--enable_info
345
 
update t1 join t2 on (t1.a=t2.a) set t1.id=t2.id;
346
 
--disable_info
347
331
 
348
332
# Check that the number of matched rows is correct when there are duplicate
349
333
# key errors
350
334
update t1 set a=1;
351
335
update t2 set a=1;
352
336
select count(*) from t1 join t2 on (t1.a=t2.a);
353
 
--enable_info
354
 
update t1 join t2 on (t1.a=t2.a) set t1.id=t2.id;
355
 
--disable_info
356
337
 
357
338
drop table t1,t2;
358
339