Test_Delete:
Server1:
Server2:
delete from test where id = 1;
delete from test where id = 3;
delete from test where id = 6;
commit;
结果:
delete from test where id = 1;
Update count: 1
(16 ms)
delete from test where id = 3;
Update count: 0
(0 ms)
delete from test where id = 6;
Update count: 1
(0 ms)
Server1:
Server2:
说明更新对两个DB都启作用了,即使DB中的记录不一致
delete from test where id = 5;
commit;
insert into test values (6, '6');
insert into test values (7, '7');
commit;
delete from test where id = 6;
commit;
结果:
delete from test where id = 5;
Update count: 1
(0 ms)
commit;
Update count: 0
(0 ms)
insert into test values (6, '6');
Update count: 1
(0 ms)
insert into test values (7, '7');
Update count: 1
(0 ms)
commit;
Update count: 0
(0 ms)
delete from test where id = 6;
Update count: 1
(0 ms)
commit;
Update count: 0
(0 ms)
Server1:
Server2:
说明没重连,对Server2的操作没有同步到Server1
delete from test where id = 2;
delete from test where id = 5;
commit;
insert into test values (6, '6');
insert into test values (7, '7');
commit;
delete from test where id = 6;
commit;
结果:
delete from test where id = 2;
Update count: 1
(16 ms)
delete from test where id = 5;
Update count: 1
(0 ms)
commit;
Update count: 0
(0 ms)
insert into test values (6, '6');
Update count: 1
(0 ms)
insert into test values (7, '7');
Update count: 1
(0 ms)
commit;
Update count: 0
(0 ms)
delete from test where id = 6;
Update count: 1
(0 ms)
commit;
Update count: 0
(0 ms)
Server1:
Server2:
说明没重连,Server2没有影响
*********************************************************************************************************
*********************************************************************************************************
*********************************************************************************************************
*********************************************************************************************************
Init data:
CREATE TABLE TEST2(ID IDENTITY , NAME VARCHAR);
Test_Insert:
insert into test2(name) values ('1');
insert into test2(name) values ('2');
insert into test2(name) values ('3');
insert into test2(name) values ('4');
insert into test2(name) values ('5');
结果:
insert into test2(name) values ('1');
Update count: 1
(16 ms)
insert into test2(name) values ('2');
Update count: 1
(0 ms)
insert into test2(name) values ('3');
Update count: 1
(0 ms)
insert into test2(name) values ('4');
Update count: 1
(0 ms)
insert into test2(name) values ('5');
Update count: 1
(0 ms)
Server1:
Server2:
执行:
delete from test2 where id = 5;
insert into test2(name) values (6);
insert into test2(name) values (7);
执行结果
delete from test2 where id = 5;
Update count: 1
(0 ms)
insert into test2(name) values (6);
Update count: 1
(0 ms)
insert into test2(name) values (7);
Update count: 1
(0 ms)
Server1:
Client/Server2:
说明没重连,对Server2的操作没有同步到Server1
客户端重新连接(读以Server1)为主
执行:
delete from test2 where id = 4;
delete from test2 where id = 5;
insert into test2(name) values (6);
insert into test2(name) values (7);
结果:
delete from test2 where id = 4;
Update count: 1
(16 ms)
delete from test2 where id = 5;
Update count: 0
(0 ms)
insert into test2(name) values (6);
Update count: 1
(0 ms)
insert into test2(name) values (7);
Update count: 1
(0 ms)
Client (Server1):
Server2:
Server2中插入了两条6和7,说明是分别做的操作