~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/multi_update.result

  • Committer: Brian Aker
  • Date: 2009-01-23 02:15:04 UTC
  • mfrom: (798.2.32 drizzle)
  • Revision ID: brian@tangent.org-20090123021504-2j99e6hxab1ew601
Merge for replication removal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
588
588
2       test t  ppc
589
589
9       abc     ppc
590
590
drop table t1, t2;
591
 
CREATE TABLE `t1` (
592
 
`a` int NOT NULL auto_increment,
593
 
`b` int default NULL,
594
 
PRIMARY KEY  (`a`)
595
 
) ENGINE=MyISAM;
596
 
CREATE TABLE `t2` (
597
 
`a` int NOT NULL auto_increment,
598
 
`b` int default NULL,
599
 
PRIMARY KEY  (`a`)
600
 
) ENGINE=MyISAM;
601
 
insert into t1 values (1,1),(2,2);
602
 
insert into t2 values (1,1),(4,4);
603
 
reset master;
604
 
UPDATE t2,t1 SET t2.a=t1.a+2;
605
 
ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
606
 
select * from t2 /* must be (3,1), (4,4) */;
607
 
a       b
608
 
3       1
609
 
4       4
610
 
show master status /* there must be the UPDATE query event */;
611
 
File    Position
612
 
master-bin.000001       107
613
 
delete from t1;
614
 
delete from t2;
615
 
insert into t1 values (1,2),(3,4),(4,4);
616
 
insert into t2 values (1,2),(3,4),(4,4);
617
 
reset master;
618
 
UPDATE t2,t1  SET t2.a=t2.b where t2.a=t1.a;
619
 
ERROR 23000: Duplicate entry '4' for key 'PRIMARY'
620
 
show master status /* there must be the UPDATE query event */;
621
 
File    Position
622
 
master-bin.000001       107
623
 
drop table t1, t2;
624
591
end of tests