MySQL Forums
Forum List  »  InnoDB

Re: Deadlocks on inserts to the same table
Posted by: Heikki Tuuri
Date: January 12, 2005 05:23PM

Radu,

why is there this lock request:

*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 1212 page no 4 n bits 272 index `client_id` of table `testdb/category` trx id 0 39965 lock mode S
waiting
Record lock, heap no 203 PHYSICAL RECORD: n_fields 3; 1-byte offs TRUE; info bits 0
0: len 8; hex 8000000000000001; asc ;; 1: len 28; hex 7465737443617465676f72792d302d31313034373833353731393634;
asc testCategory-0-1104783571964;;2: len 8; hex 80000000000001b3; asc ;;

?

This can be a result that you are inserting the same key to a UNIQUE index twice, i.e., it is a duplicate key error. Is this intentional?

Row locks are held to the end of the transaction. Only the AUTO-INC lock is released at each statement end.

Best regards,

Heikki
Oracle Corp./Innobase Oy
InnoDB - transactions, row level locking, and foreign keys for MySQL

InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM tables
http://www.innodb.com/order.php

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Deadlocks on inserts to the same table
2764
January 12, 2005 05:23PM


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.