diff options
author | unknown <aelkin/elkin@koti.dsl.inet.fi> | 2007-10-13 16:51:16 +0300 |
---|---|---|
committer | unknown <aelkin/elkin@koti.dsl.inet.fi> | 2007-10-13 16:51:16 +0300 |
commit | 1408095a117b3ebd7dab604a9f0d67a476f48aa4 (patch) | |
tree | 74c4e2294c47be50cfaef8a70605cea1500c971d /mysql-test/t/innodb.test | |
parent | b3b01cf48b6ab3139ee782ac91cf804a3efb7f2a (diff) | |
parent | c8b6d1050933f0b9b18367c421702c9f16907de5 (diff) | |
download | mariadb-git-1408095a117b3ebd7dab604a9f0d67a476f48aa4.tar.gz |
Merge koti.dsl.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug29136-mdelete
into koti.dsl.inet.fi:/home/elkin/MySQL/merge-5.1
mysql-test/t/multi_update.test:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
manual merge use local; another file has to be changed in 5_1.
mysql-test/r/innodb.result:
manual merge use local to re-record the results
mysql-test/r/multi_update.result:
manual merge use local to re-record the results
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
manual merge use local to re-record the results
mysql-test/t/innodb.test:
restoring bug#27716 snippet
sql/log_event.cc:
trasfering simulation to another file: rpl_rli.cc
Diffstat (limited to 'mysql-test/t/innodb.test')
-rw-r--r-- | mysql-test/t/innodb.test | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index cc1ef6f9730..63682ab96eb 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -754,6 +754,77 @@ 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; + +# +# Bug #29136 erred multi-delete on trans table does not rollback +# + +# prepare +--disable_warnings +drop table if exists t1, t2; +--enable_warnings +CREATE TABLE t1 (a int, PRIMARY KEY (a)); +CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB; +create trigger trg_del_t2 after delete on t2 for each row + insert into t1 values (1); +insert into t1 values (1); +insert into t2 values (1),(2); + + +# exec cases A, B - see multi_update.test + +# A. send_error() w/o send_eof() branch + +--error ER_DUP_ENTRY +delete t2 from t2; + +# check + +select count(*) from t2 /* must be 2 as restored after rollback caused by the error */; + +# cleanup bug#29136 + +drop table t1, t2; + + +# # Testing of IFNULL # create table t1 (a int, b int) engine=innodb; |