Last modified: 2008-12-16 02:06:21 UTC
I was editing List of US Supreme Court Cases on en when I got this error: A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: SELECT cur_id,cur_namespace,cur_title FROM `cur`,`links` WHERE cur_id=l_to AND l_from=102337 FOR UPDATE from within function "LinkCache::preFill". MySQL returned error "1213: Deadlock found when trying to get lock; Try restarting transaction (10.0.0.1)".
*** Bug 1296 has been marked as a duplicate of this bug. ***
This can be fixed at any time by setting $wgDumbLinkUpdates = true. This elimates any chance of a deadlock on the heavily-updated link table. Unfortunately (according to JamesDay) that causes the slaves to choke and die. A strategy of reducing lock time may be a better approach, and a few such tweaks have been made. Deadlocks should be much less frequent than they once were. As far as I'm concerned, a friendlier error message allowing the user to resubmit their edit easily would close this bug.
Couldn't we restart the transaction automatically in this case, by at some level re-callling a function?
Restored from flood attack.
*** Bug 5824 has been marked as a duplicate of this bug. ***
*** Bug 5166 has been marked as a duplicate of this bug. ***
*** Bug 5876 has been marked as a duplicate of this bug. ***
The same error appeared on your mediawiki today. Mediawiki 1.11.0 Mysql 5.0.22 PHP 5.1.2 (cgi-fcgi) The error message: In the function "MediaWikiBagOStuff::_doinsert" MySQL returned the error "1213: Deadlock found when trying to get lock; try restarting transaction (localhost)"
I got this error today on 1.13.0 on Windows 2003 Server when trying to view a page, not edit it. --~~~~
(In reply to comment #9) > I got this error today on 1.13.0 on Windows 2003 Server when trying to view a > page, not edit it. --~~~~ > These tables don't exist anymore, like the query
Closing as WORKSFORME. As Aaron said, 'cur' doesn't exist anymore. Nor does this query, or even the method LinkCache::preFill. Any deadlock errors on save would be unrelated to this.