blob: 63452a4766f72ae316963cb283bccd1d4991b07a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
source include/have_tokudb.inc;
set tokudb_enable_fast_upsert=1;
source ../include/setup_fast_update_upsert.inc;
create table t (id bigint primary key, b bigint not null default 0)
engine = tokudb;
connect (conn1,localhost,root,,);
SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'STRICT_TRANS_TABLES',''));
SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'STRICT_ALL_TABLES',''));
set tokudb_enable_fast_upsert=1;
connection default;
begin;
insert into t (id) values (1) on duplicate key update b=b+1;
connection conn1;
begin;
insert into t (id) values (2) on duplicate key update b=b-1;
connection default;
send insert into t (id) values (2) on duplicate key update b=b+1;
connection conn1;
sleep 1;
error 1205,1213;
insert into t (id) values (1) on duplicate key update b=b-1;
rollback;
connection default;
reap;
commit;
connection default;
disconnect conn1;
select * from t;
drop table t;
|