Commit 83277084 authored by Mats Kindahl's avatar Mats Kindahl

Bug #40116:

Uncommited changes are replicated and stay on slave after
rollback on master

Making test slightly more generic and robust.

mysql-test/suite/rpl/t/rpl_trigger.test:
  Adding code to check that InnoDB is available on slave as well.
  Making code slightly more generic.
parent 43e9d5b3
......@@ -988,16 +988,9 @@ after insert on t1
for each row insert into log values ( new.f );
set autocommit = 0;
insert into t1 values ( 1 );
select * from t1;
f
1
select * from t1;
f
rollback;
Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back
select * from t1;
f
select * from t1;
f
Comparing tables master:test.t1 and slave:test.t1
Comparing tables master:test.log and slave:test.log
drop table t1, log;
......@@ -480,8 +480,11 @@ sync_slave_with_master;
# rollback on master
#
connection master;
source include/master-slave-reset.inc;
source include/have_innodb.inc;
connection slave;
source include/have_innodb.inc;
connection master;
create table t1 ( f int ) engine = innodb;
......@@ -492,16 +495,15 @@ create trigger tr
set autocommit = 0;
insert into t1 values ( 1 );
rollback;
select * from t1;
sync_slave_with_master;
select * from t1;
let $diff_table_1=master:test.t1;
let $diff_table_2=slave:test.t1;
--source include/diff_tables.inc
connection master;
rollback;
select * from t1;
sync_slave_with_master;
select * from t1;
let $diff_table_1=master:test.log;
let $diff_table_2=slave:test.log;
--source include/diff_tables.inc
connection master;
drop table t1, log;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment