Bug #45743 Error_code: 1213 Deadlock
Submitted: 25 Jun 2009 10:56 Modified: 9 Aug 2009 8:05
Reporter: Gonzales Jonathan Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version: OS:Linux (red hat)
Assigned to: CPU Architecture:Any

[25 Jun 2009 10:56] Gonzales Jonathan
Description:
Hello, i have an error on my slave. Can you help me about this error.

090624 23:33:39 [ERROR] Slave: Error 'Deadlock found when trying to get lock; try restarting transaction' on query. Default database: 'gprs_v2'. Query: 'INSERT INTO T_Recep SET RcClientCode='5312', RcMCUCode='102', RcChLongitude='483047060', RcChLatitude='014638050', RcEventState='55', RcEventDate='2009-06-24 21:31:02', RcDriverKey ='81FE2A', RcKms='0', RcSpeed='0', RcDirection='0', RcNumSat='10', RcQualGSM='51', RcHdop='212' , RcInsert=NOW(), RcCnxAt='2009-06-24 21:33:34'', Error_code: 1213

How to repeat:
I have restart the slave but it's not the first time that this error appears.
[25 Jun 2009 15:56] Valeriy Kravchuk
Do you modify this T_Recep table on the slave locally? What server version do you use?

Please, send the results of 

SHOW CREATE TABLE T_Recep\G

and the results of

SHOW INNODB STATUS\G

obtained immediately after this error when it will happen next time.
[26 Jun 2009 13:53] Gonzales Jonathan
Deadlock

Attachment: Requests.txt (text/plain), 34.43 KiB.

[26 Jun 2009 13:54] Gonzales Jonathan
I have join a file with the request.

Thanks for all
[1 Jul 2009 11:56] Gonzales Jonathan
Have you an idea about this ?
[9 Jul 2009 6:52] Gonzales Jonathan
Excuse me but we have a mysql account and when we have problem or bug nobody help us.
Thanks for help me fastly because it's a  big problem.

Thanks
[9 Jul 2009 8:05] Valeriy Kravchuk
From your file I see that 2 threads where changing the same table (DELETE and UPDATE), and none of them was replication SQL thread it seems... So, looks like you do have some concurrent local changes in data on slave.

Please, send the results of:

explain SELECT * FROM gprs_v2.T_Recep WHERE rcflagtrait=140  and rcCLientCode=1073\G

explain SELECT * FROM gprs_v2.T_Recep WHERE rcCLientCode=3292 AND rcFlagTrait in(0,211)\G

I do not see any evidence of MySQL bug here yet. Deadlocks are possible and expected if you change the same data concurrently from different threads.
[9 Aug 2009 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".