Howdy all,

We have a set of tables in a database that maintain
session information of users of a website. Each user's
session is identified by a GUID that we generate when
they login. As the users perform various operations
records are inserted/updated/deleted from these
session tables. Some of the tables change frequently
as users go about their business. One thing that I'm
seesing is that we're getting deadlocks when records
are being removed.

Here's the structure of the table:

CREATE TABLE `s_customer_identifier` (
  `session_guid` varchar(36) NOT NULL default '',
  `label` varchar(50) NOT NULL default '',
  `customer_id` int(11) NOT NULL default '0',
  `pref_id` int(11) NOT NULL default '0',
  `office_id` int(11) NOT NULL default '0',
  `sort_id` int(11) NOT NULL default '0',
  KEY `idx_session_guid` (`session_guid`)
) TYPE=InnoDB

The records are referenced for deletion by the
session_guid and label:

DELETE FROM s_customer_identifier WHERE session_guid =
'5E6ED651-3725-11D9-96C0-FE7645265844' AND label =
'selected_customers';

is a typical example.

A typical log statement we get when this happens is:

General error,  message from server: "Deadlock found
when trying to get lock; Try restarting transaction"

Is there some obvious cause based on what I've
provided?

Thanks,

Tripp


                
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to