bdb-deadlock.result 581 Bytes
Newer Older
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
1 2 3 4 5 6 7 8 9 10 11 12 13
drop table if exists t1,t2;
create table t1 (id integer, x integer) type=BDB;
create table t2 (id integer, x integer) type=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;
Deadlock found when trying to get lock; Try restarting transaction
commit;
14 15
x
1
16
commit;
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
17
select * from t1;
18 19
id	x
0	1
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
20
select * from t2;
21 22
id	x
0	1
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
23
commit;
24
select * from t1;
25 26
id	x
0	1
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
27
select * from t2;
28 29
id	x
0	1
monty@hundin.mysql.fi's avatar
monty@hundin.mysql.fi committed
30 31
commit;
drop table t1,t2;