1drop table if exists t1;
2connect  a,localhost,root,,;
3connect  b,localhost,root,,;
4connection a;
5set session transaction isolation level read committed;
6create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
7create table t2 like t1;
8insert into t2 values (1),(2),(3),(4),(5),(6),(7);
9set autocommit=0;
10begin;
11replace into t1 select * from t2;
12connection b;
13set session transaction isolation level read committed;
14set autocommit=0;
15delete from t2 where a=5;
16commit;
17delete from t2;
18commit;
19connection a;
20commit;
21begin;
22insert into t1 select * from t2;
23connection b;
24set session transaction isolation level read committed;
25set autocommit=0;
26delete from t2 where a=5;
27commit;
28delete from t2;
29commit;
30connection a;
31commit;
32select * from t1;
33a
341
352
363
374
385
396
407
41drop table t1;
42drop table t2;
43connection default;
44disconnect a;
45disconnect b;
46