2001-11-26 02:52:23 +01:00
|
|
|
drop table if exists t1,t2;
|
2003-12-10 05:31:42 +01:00
|
|
|
create table t1 (id integer, x integer) engine=BDB;
|
|
|
|
create table t2 (id integer, x integer) engine=BDB;
|
2001-11-26 02:52:23 +01:00
|
|
|
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;
|
2004-06-15 22:38:36 +02:00
|
|
|
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
2001-11-26 02:52:23 +01:00
|
|
|
commit;
|
2001-11-26 01:16:38 +01:00
|
|
|
x
|
|
|
|
1
|
2002-11-12 16:21:11 +01:00
|
|
|
commit;
|
2001-11-26 02:52:23 +01:00
|
|
|
select * from t1;
|
2002-11-12 16:21:11 +01:00
|
|
|
id x
|
|
|
|
0 1
|
2001-11-26 02:52:23 +01:00
|
|
|
select * from t2;
|
2001-11-26 01:16:38 +01:00
|
|
|
id x
|
|
|
|
0 1
|
2001-11-26 02:52:23 +01:00
|
|
|
commit;
|
2002-11-12 16:21:11 +01:00
|
|
|
select * from t1;
|
2001-11-26 01:16:38 +01:00
|
|
|
id x
|
|
|
|
0 1
|
2001-11-26 02:52:23 +01:00
|
|
|
select * from t2;
|
2001-11-26 01:16:38 +01:00
|
|
|
id x
|
|
|
|
0 1
|
2001-11-26 02:52:23 +01:00
|
|
|
commit;
|
|
|
|
drop table t1,t2;
|