Commit 4e9695ac 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.
parent 82757fdf
...@@ -988,16 +988,9 @@ after insert on t1 ...@@ -988,16 +988,9 @@ after insert on t1
for each row insert into log values ( new.f ); for each row insert into log values ( new.f );
set autocommit = 0; set autocommit = 0;
insert into t1 values ( 1 ); insert into t1 values ( 1 );
select * from t1;
f
1
select * from t1;
f
rollback; rollback;
Warnings: Warnings:
Warning 1196 Some non-transactional changed tables couldn't be rolled back Warning 1196 Some non-transactional changed tables couldn't be rolled back
select * from t1; Comparing tables master:test.t1 and slave:test.t1
f Comparing tables master:test.log and slave:test.log
select * from t1;
f
drop table t1, log; drop table t1, log;
...@@ -480,8 +480,11 @@ sync_slave_with_master; ...@@ -480,8 +480,11 @@ sync_slave_with_master;
# rollback on master # rollback on master
# #
connection master;
source include/master-slave-reset.inc; source include/master-slave-reset.inc;
source include/have_innodb.inc; source include/have_innodb.inc;
connection slave;
source include/have_innodb.inc;
connection master; connection master;
create table t1 ( f int ) engine = innodb; create table t1 ( f int ) engine = innodb;
...@@ -492,16 +495,15 @@ create trigger tr ...@@ -492,16 +495,15 @@ create trigger tr
set autocommit = 0; set autocommit = 0;
insert into t1 values ( 1 ); insert into t1 values ( 1 );
rollback;
select * from t1; let $diff_table_1=master:test.t1;
sync_slave_with_master; let $diff_table_2=slave:test.t1;
select * from t1; --source include/diff_tables.inc
connection master; let $diff_table_1=master:test.log;
rollback; let $diff_table_2=slave:test.log;
select * from t1; --source include/diff_tables.inc
sync_slave_with_master;
select * from t1;
connection master; connection master;
drop table t1, log; 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