Is this normal?
My mysqld (4.0.20 on slackware 10) gets a deadlock in the following simple case:
1.mysql> set autocommit=0;
2.mysql> set autocommit=0;
1.mysql> select * from T where C = 42 for update;
2.mysql> select * from T where C = 42 for update;
1.mysql> insert into T set C = 42;
ERROR 1213: Deadlock found when trying to get lock; Try restarting transaction
This is on an empty table T with a single column C.
Table created by:
create table T (C int not null primary key) type=InnoDB;
Is this normal? Why is there a deadlock here? The second select blocks,
which suggests that the "phantom record" C = 42 is locked correctly,
so I don't understand why the insert fails.
Subject
Views
Written By
Posted
Is this normal?
4422
January 06, 2005 12:32PM
3021
January 07, 2005 03:30PM
2906
January 07, 2005 03:36PM
3337
January 07, 2005 10:55PM
2985
January 10, 2005 05:08PM
3055
January 11, 2005 10:35AM
3282
January 12, 2005 09:56AM
2968
January 12, 2005 04:46PM
3638
January 12, 2005 05:36PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.