source include/have_tokudb.inc;

set tokudb_enable_fast_update=1;
source ../include/setup_fast_update_upsert.inc;

create table t (id bigint primary key,
                b bigint not null default 0) engine = tokudb;
insert into t (id) values (1),(2);

connect (conn1,localhost,root,,);
set tokudb_enable_fast_update=1;
source ../include/setup_fast_update_upsert.inc;

connection default;
begin;
update t set b=b+1 where id=1;

connection conn1;
begin;
update t set b=b-1 where id=2;

connection default;
send update t set b=b+1 where id=2;

connection conn1;
sleep 1;
error 1205,1213;
update t set b=b-1 where id=1;
rollback;

connection default;
reap;
commit;

connection default;
disconnect conn1;

select * from t;

drop table t;
