Bug #23831 | deadlock not noticed | ||
---|---|---|---|
Submitted: | 1 Nov 2006 10:25 | Modified: | 27 Nov 2006 18:35 |
Reporter: | Andrei Elkin | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Row Based Replication ( RBR ) | Severity: | S3 (Non-critical) |
Version: | 5.1.13 | OS: | |
Assigned to: | Andrei Elkin | CPU Architecture: | Any |
[1 Nov 2006 10:25]
Andrei Elkin
[1 Nov 2006 21:31]
Sveta Smirnova
Thank you for the report. Using current 5.0 and 5.1 BK sources I get error "061101 21:49:19 [ERROR] Slave: Error 'Deadlock found when trying to get lock; try restarting transaction' on query. Default database: 'bug23831'. Query: 'insert into t2 set a=2', Error_code: 1213" Is behaviour correct?
[2 Nov 2006 10:42]
Sveta Smirnova
Thank you for the report. Verified as described. Only row-based replication is affected.
[2 Nov 2006 10:53]
Lars Thalmann
Two things needs to be fixed: 1. Proper error message in case of deadlock, 2. Proper rollback in case of deadlock
[2 Nov 2006 15:52]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/14754 ChangeSet@1.2324, 2006-11-02 17:51:32+02:00, aelkin@dsl-hkigw8-feaef900-46.dhcp.inet.fi +3 -0 Bug#16228/Bug#20697 - related. Bug#23831 deadlock not noticed RBR bug in that when replicated msta (multi-statement-trans-action) deadlocks against a local at write row event, the event handler did not return the correct error code. That led to problems of replaying replicated msta. The correct code is typed in error log and stored for error handling rotine to detect DL or TO and execute necessary tasks the same way as in SBR. Particularly, timed-out transaction still is rolled back - look at the related bugs.
[3 Nov 2006 12:27]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/14801 ChangeSet@1.2324, 2006-11-03 14:26:40+02:00, aelkin@dsl-hkigw8-feaef900-46.dhcp.inet.fi +3 -0 Bug#16228/Bug#20697 - related. Bug#23831 deadlock not noticed RBR bug in that when replicated msta (multi-statement-trans-action) deadlocks with a local at write row event or gets timed-out, the event handler did not return the correct error code. Wrong error code stops slave sql thread instead of to proceed with rollback and replay. The correct code is typed in error log and stored for error handling rotine to conduct rollback and replay of the transaction. The handling for the rbr remains the same as for the sbr events. Particularly, timed-out transaction still is rolled back - look at the related bugs.
[20 Nov 2006 15:37]
Lars Thalmann
Pushed into 5.1.14.
[27 Nov 2006 18:35]
Paul DuBois
Noted in 5.1.14 changelog. With row-based binary logging, replicated multiple-statement transaction deadlocks did not return the correct error code, causing the slave SQL thread to stop rather than roll back and re-execute.