Skip to content

Commit d8493f4

Browse files
committed
Merge branch 'master' into releases/tokudb-7.5
2 parents c30c109 + 1abb228 commit d8493f4

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
set default_storage_engine=tokudb;
2+
drop table if exists t;
3+
create table t (id int not null primary key, c int not null) engine=tokudb;
4+
insert into t values (1,0);
5+
begin;
6+
update t set c=10 where id=1;
7+
update t set c=100;
8+
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
9+
rollback;
10+
drop table t;
11+
create table t (id int not null primary key, c int not null) engine=tokudb partition by hash(id) partitions 1;
12+
insert into t values (1,0);
13+
begin;
14+
update t set c=10 where id=1;
15+
update t set c=100;
16+
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
17+
rollback;
18+
drop table t;
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# test for the DB-801 bug on mysql-5.5.41
2+
source include/have_tokudb.inc;
3+
source include/have_partition.inc;
4+
set default_storage_engine=tokudb;
5+
6+
disable_warnings;
7+
drop table if exists t;
8+
enable_warnings;
9+
10+
# run the test on a tokudb table
11+
create table t (id int not null primary key, c int not null) engine=tokudb;
12+
13+
insert into t values (1,0);
14+
15+
connect(conn1,localhost,root,,);
16+
connection default;
17+
begin;
18+
update t set c=10 where id=1;
19+
20+
connection conn1;
21+
--error ER_LOCK_WAIT_TIMEOUT
22+
update t set c=100;
23+
24+
connection default;
25+
rollback;
26+
disconnect conn1;
27+
28+
drop table t;
29+
30+
# run the test on a partitioned tokudb table
31+
create table t (id int not null primary key, c int not null) engine=tokudb partition by hash(id) partitions 1;
32+
33+
insert into t values (1,0);
34+
35+
connect(conn1,localhost,root,,);
36+
connection default;
37+
begin;
38+
update t set c=10 where id=1;
39+
40+
connection conn1;
41+
--error ER_LOCK_WAIT_TIMEOUT
42+
update t set c=100;
43+
44+
connection default;
45+
rollback;
46+
disconnect conn1;
47+
48+
drop table t;
49+
50+

0 commit comments

Comments
 (0)