summaryrefslogtreecommitdiff
path: root/mysql-test/r/bdb-deadlock.result
blob: 9394c90ff00191169509c0163eb5e453773d7696 (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
drop table if exists t1,t2;
create table t1 (id integer, x integer) engine=BDB;
create table t2 (id integer, x integer) engine=BDB;
insert into t1 values(0, 0);
insert into t2 values(0, 0);
set autocommit=0;
update t1 set x = 1 where id = 0;
set autocommit=0;
update t2 set x = 1 where id = 0;
select x from t1 where id = 0;
select x from t2 where id = 0;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
commit;
x
1
commit;
select * from t1;
id	x
0	1
select * from t2;
id	x
0	1
commit;
select * from t1;
id	x
0	1
select * from t2;
id	x
0	1
commit;
drop table t1,t2;