Last modified: 2013-01-06 20:30:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T25544, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23544 - deleteBatch.php causes database deadlock
deleteBatch.php causes database deadlock
Status: NEW
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.17.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 28599
  Show dependency treegraph
 
Reported: 2010-05-16 09:22 UTC by Liangent
Modified: 2013-01-06 20:30 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Liangent 2010-05-16 09:22:52 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)”.
Comment 1 Roan Kattouw 2010-05-17 08:56:22 UTC
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 :) ).
Comment 2 Liangent 2010-05-17 10:27:27 UTC
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.
Comment 3 Mark A. Hershberger 2011-07-21 21:49:50 UTC
need to decide if this deserves more attention/higher priority.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links