r45600 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45599‎ | r45600 | r45601 >
Date:13:44, 9 January 2009
Author:aaron
Status:resolved (Comments)
Tags:
Comment:
Clear dead MW: namespace rows (bug 16846)
Modified paths:
  • /trunk/phase3/maintenance/updateRestrictions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/updateRestrictions.php
@@ -81,6 +81,8 @@
8282 echo "...removing dead rows from page_restrictions\n";
8383 // Kill any broken rows from previous imports
8484 $db->delete( 'page_restrictions', array( 'pr_level' => '' ) );
 85+ // Kill other invalid rows
 86+ $db->deleteJoin( 'page_restrictions', 'page', 'pr_page', 'page_id', array('page_namespace' => NS_MEDIAWIKI) );
8587 echo "...Done!\n";
8688 }
8789

Follow-up revisions

RevisionCommit summaryAuthorDate
r45882Tweak r45600: kill the broken page_restrictions columns tooaaron19:55, 18 January 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   00:30, 14 January 2009

I don't think this is really doing the job right... The "bogus" data is still left in the page_restrictions field in the page table.... shouldn't that be getting cleared?

#Comment by Voice of All (talk | contribs)   00:38, 14 January 2009

This is for the protectedpage list, which only cares about that table.

#Comment by Brion VIBBER (talk | contribs)   00:44, 14 January 2009

If you don't clear them from the page table, they'll just keep getting lazy-upgraded back into the page_restrictions table.

#Comment by Aaron Schulz (talk | contribs)   01:48, 14 January 2009

Where?

#Comment by Aaron Schulz (talk | contribs)   13:26, 16 January 2009

I don't see any lazy-upgrade code, the closest is the updateRestrictions stuff

#Comment by Aaron Schulz (talk | contribs)   19:55, 18 January 2009

Changed in r45882

Status & tagging log