Last modified: 2013-01-06 20:30:35 UTC
I was running: echo "SELECT page_title AS XXXXXXXXXXXXXXXXXXXXXXXXX FROM page WHERE page_random <= .8 and page_namespace = 0;" | mysql -u root -p xxxxwiki | php deleteBatch.php trying to delete ~80% random articles from DB. After some of articles were deleted, it said (translated): Database query syntax error occurred. Recent query was: “DELETE FROM `pagelinks` WHERE pl_from = '3108'” In function “Database::delete”. Database returns error “1213: Deadlock found when trying to get lock; try restarting transaction (localhost)”.
AFAIK this is a typical case of "shit happpens, restart script". The deadlock itself is probably caused by another user causing the pagelinks table for that page to be updated; try putting the wiki in read-only mode and see if that helps (hopefully the script will still be able to delete stuff :) ).
It's a test wiki set up for testing new extensions, so I guess no one is doing something on the wiki at that time. I tried to restarted the script but the same error always occurred again and again after deleting some more articles.
need to decide if this deserves more attention/higher priority.