1
# test replicated update rows log events on a table with a primary key.
3
source include/have_tokudb.inc;
5
source include/have_binlog_format_row.inc;
6
source include/master-slave.inc;
11
drop table if exists t;
15
# show variables like 'read_only';
16
# show variables like 'tokudb_rpl_%';
20
# select @@binlog_format;
21
# select @@autocommit;
22
eval create table t (a bigint not null, b bigint not null, c bigint not null, primary key(a), unique key(c)) engine=$engine;
23
# show create table t;
24
insert into t values (1,0,-1);
25
insert into t values (2,0,-2),(3,0,-3);
26
insert into t values (4,0,-4);
28
# wait for the inserts to finish on the slave
30
sync_slave_with_master;
31
# source include/sync_slave_sql_with_master.inc;
35
--let $diff_tables= master:test.t, slave:test.t
36
source include/diff_tables.inc;
40
update t set b=b+1 where a=2;
41
update t set b=b+2 where a=1;
42
update t set b=b+3 where a=4;
43
update t set b=b+4 where a=3;
44
update t set b=b+1 where 1<=a and a<=3;
45
select unix_timestamp() into @tstart;
47
# wait for the delete to finish on the slave
49
sync_slave_with_master;
50
# source include/sync_slave_sql_with_master.inc;
52
select unix_timestamp() into @tend;
53
select @tend-@tstart <= 5; # assert no delay in the delete time
59
--let $diff_tables= master:test.t, slave:test.t
60
source include/diff_tables.inc;
64
drop table if exists t;
66
sync_slave_with_master;
67
# source include/sync_slave_sql_with_master.inc;
69
source include/rpl_end.inc;