Multi-threaded Slave (MTS) Stops After Error 'Deadlock Found When Trying To Get Lock; Try Restarting Transaction' On Query (Doc ID 1608717.1)

Last updated on MAY 05, 2016

Applies to:

MySQL Server - Version 5.6 to 5.7 [Release 5.6 to 5.7]
Information in this document applies to any platform.

Symptoms

Multi-threaded Slave (MTS) worker thread stops with following error seen on MySQL Error log:

2013-12-13 11:21:00 1436 [Warning] Slave SQL: Worker 3 failed executing transaction '' at master log log-bin.000097, end_log_pos 4492173; Error 'Deadlock found when trying to get lock; try restarting transaction' on query. Default database: 'mobicallcalendar'. Query: 'UPDATE time SET time.in = TIMESTAMP('2014-10-06 8:00') WHERE TIMESTAMP('2014-10-06 8:00') > time.in AND TIMESTAMP('2014-10-06 8:00') < time.out AND time.typenumber = '891' AND id != '-1'', Error_code: 1213
2013-12-13 11:21:00 1436 [Note] Worker 3 is exiting: killed 0, error 1, running_status 1
2013-12-13 11:21:00 1436 [Note] Worker 3 statistics: events processed = 3121095 hungry waits = 0 priv queue overfills = 0
2013-12-13 11:21:00 1436 [ERROR] Slave SQL: ... The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state. A restart should restore consistency automatically, although using non-transactional storage for data or info tables or DDL queries could lead to problems. In such cases you have to examine your data (see documentation for details). Error_code: 1756
2013-12-13 11:21:00 1436 [Warning] Slave SQL: ... The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state. A restart should restore consistency automatically, although using non-transactional storage for data or info tables or DDL queries could lead to problems. In such cases you have to examine your data (see documentation for details). Error_code: 1756
2013-12-13 11:21:00 1436 [Note] Notifying Worker 2 to exit, thd 0x4f3bf8e0

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms