summaryrefslogtreecommitdiff
path: root/mysql-test/t/innodb.test
diff options
context:
space:
mode:
authorunknown <aelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi>2007-06-01 13:22:52 +0300
committerunknown <aelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi>2007-06-01 13:22:52 +0300
commit4bdbc3396ea4335ed1f6d01afe4f557b57b183a3 (patch)
tree2f4dd30394a624370cfe07bfc88e6923a90ab697 /mysql-test/t/innodb.test
parenteb056fb82b7593201ae01ef68c86dbbb54a498d5 (diff)
parent6b94fc579fdf3ddf4905a5b2c3c9e76d445f1304 (diff)
downloadmariadb-git-4bdbc3396ea4335ed1f6d01afe4f557b57b183a3.tar.gz
Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into dsl-hkibras1-ff5dc300-70.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27716-multi_upd_no_binlog mysql-test/r/innodb.result: Auto merged mysql-test/t/innodb.test: Auto merged sql/sql_update.cc: Auto merged
Diffstat (limited to 'mysql-test/t/innodb.test')
-rw-r--r--mysql-test/t/innodb.test39
1 files changed, 39 insertions, 0 deletions
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index f7fa7366101..60c4a3a8d36 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -754,6 +754,45 @@ 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
+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
+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
#
create table t1 (a int, b int) engine=innodb;