1# test case for overlocking unique secondary keys
2source include/have_tokudb.inc;
3set default_storage_engine=tokudb;
4disable_warnings;
5drop table if exists t;
6enable_warnings;
7
8create table t (id int, unique key(id));
9insert into t values (10),(100);
10connect(c1,localhost,root,,);
11begin;
12insert into t values (50);
13connect(c2,localhost,root,,);
14begin;
15insert into t values (60);
16connection c1;
17commit;
18connection c2;
19commit;
20connection default;
21select * from t;
22disconnect c1;
23disconnect c2;
24drop table if exists t;
25
26create table t (id int not null, unique key(id));
27insert into t values (10),(100);
28connect(c1,localhost,root,,);
29begin;
30insert into t values (50);
31connect(c2,localhost,root,,);
32begin;
33insert into t values (60);
34connection c1;
35commit;
36connection c2;
37commit;
38connection default;
39select * from t;
40disconnect c1;
41disconnect c2;
42drop table if exists t;
43
44