mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl
into mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge
This commit is contained in:
@ -755,6 +755,45 @@ select * from t1;
|
||||
select * from t2;
|
||||
drop table t1,t2;
|
||||
|
||||
#
|
||||
# Bug#27716 multi-update did partially and has not binlogged
|
||||
#
|
||||
|
||||
CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL auto_increment,
|
||||
`b` int(11) default NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;
|
||||
|
||||
CREATE TABLE `t2` (
|
||||
`a` int(11) NOT NULL auto_increment,
|
||||
`b` int(11) default NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=INNODB DEFAULT CHARSET=latin1 ;
|
||||
|
||||
# A. testing multi_update::send_eof() execution branch
|
||||
insert into t1 values (1,1),(2,2);
|
||||
insert into t2 values (1,1),(4,4);
|
||||
reset master;
|
||||
--error ER_DUP_ENTRY_WITH_KEY_NAME
|
||||
UPDATE t2,t1 SET t2.a=t1.a+2;
|
||||
# check
|
||||
select * from t2 /* must be (3,1), (4,4) */;
|
||||
show master status /* there must no UPDATE in binlog */;
|
||||
|
||||
# B. testing multi_update::send_error() execution branch
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
insert into t1 values (1,2),(3,4),(4,4);
|
||||
insert into t2 values (1,2),(3,4),(4,4);
|
||||
reset master;
|
||||
--error ER_DUP_ENTRY_WITH_KEY_NAME
|
||||
UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a;
|
||||
show master status /* there must be no UPDATE query event */;
|
||||
|
||||
# cleanup bug#27716
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Testing of IFNULL
|
||||
#
|
||||
|
Reference in New Issue
Block a user