diff options
author | unknown <tsmith@ramayana.hindu.god> | 2007-08-18 00:36:18 -0600 |
---|---|---|
committer | unknown <tsmith@ramayana.hindu.god> | 2007-08-18 00:36:18 -0600 |
commit | 92838cc4486dd1079a1a1ea5ecb7fb946c12fc9d (patch) | |
tree | 4f21c28c82a759fe505ceaac1cc1dbceefd2b6e4 /mysql-test/suite | |
parent | dc4a1ef8fdbd02d998843adea18e73f32593cbe1 (diff) | |
parent | 4f3c8e772329e242dd2b7c8885b1f99246b02849 (diff) | |
download | mariadb-git-92838cc4486dd1079a1a1ea5ecb7fb946c12fc9d.tar.gz |
Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/binlog/r/binlog_innodb.result | 33 | ||||
-rw-r--r-- | mysql-test/suite/binlog/t/binlog_innodb.test | 39 |
2 files changed, 72 insertions, 0 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_innodb.result b/mysql-test/suite/binlog/r/binlog_innodb.result index 9dfb6544811..34538eb5215 100644 --- a/mysql-test/suite/binlog/r/binlog_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_innodb.result @@ -135,4 +135,37 @@ show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 drop table t1; +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 ; +insert into t1 values (1,1),(2,2); +insert into t2 values (1,1),(4,4); +reset master; +UPDATE t2,t1 SET t2.a=t1.a+2; +ERROR 23000: Duplicate entry '3' for key 'PRIMARY' +select * from t2 /* must be (3,1), (4,4) */; +a b +1 1 +4 4 +show master status /* there must no UPDATE in binlog */; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 106 +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; +UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a; +ERROR 23000: Duplicate entry '4' for key 'PRIMARY' +show master status /* there must be no UPDATE query event */; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 106 +drop table t1, t2; End of tests diff --git a/mysql-test/suite/binlog/t/binlog_innodb.test b/mysql-test/suite/binlog/t/binlog_innodb.test index 3bad61db23a..df99e3786ee 100644 --- a/mysql-test/suite/binlog/t/binlog_innodb.test +++ b/mysql-test/suite/binlog/t/binlog_innodb.test @@ -130,4 +130,43 @@ show status like "binlog_cache_use"; show status like "binlog_cache_disk_use"; drop table t1; +# +# 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; + --echo End of tests |