Last modified: 2009-08-23 09:40:05 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 T21857, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19857 - maintenance/deleteRevision.php on last revision breaks targeted page
maintenance/deleteRevision.php on last revision breaks targeted page
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Maintenance scripts (Other open bugs)
1.16.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-21 10:57 UTC by Nat Makarevitch
Modified: 2009-08-23 09:40 UTC (History)
2 users (show)

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


Attachments

Description Nat Makarevitch 2009-07-21 10:57:32 UTC
maintenance/deleteRevision.php, when used on the last revision of a page, 'breaks' it: trying to access to it leads to an error message ("database cannot find article contents").

Cause: maintenance/deleteRevision.php or an underlying function fails to maintain the page_latest column.

---------
Manual fix after such an incident:

('TITLE' is the article title):
select rev_id,rev_user_text,rev_timestamp,left(rev_comment,60) from page,revision where rev_page=page_id and page_title='TITLE' order by rev_id desc limit 1

Check, using the page history, that the revision is the topmost one

Then:
('X' is the rev_id):
update page set page_latest=X where namespace=0 and page_id=;
---------

Note: my MW instance animates a wiki farm, therefore at deleteRevision.php invocation time a symlink is tied from the adequate file to 'AdminSettings.php' and the '--conf=' argument is provided along with the adequate filename.

Thx for the great work on MW
Comment 1 Alexandre Emsenhuber [IAlex] 2009-07-22 10:35:04 UTC
fixed in r53641.
Comment 2 Brion Vibber 2009-08-21 22:52:06 UTC
Reverted in r55457 -- unindexed query would cause full scan on page table.
Comment 3 Alexandre Emsenhuber [IAlex] 2009-08-23 09:40:05 UTC
Fixed again in r55523.

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


Navigation
Links