Index: branches/wmf-deployment/maintenance/deleteSelfExternals.php |
— | — | @@ -0,0 +1,16 @@ |
| 2 | +<? |
| 3 | + |
| 4 | +require_once("commandLine.inc"); |
| 5 | + |
| 6 | +print "Deleting self externals from $wgServer\n"; |
| 7 | +$db = wfGetDB(DB_MASTER); |
| 8 | +while (1) { |
| 9 | + wfWaitForSlaves( 2 ); |
| 10 | + $db->commit(); |
| 11 | + $q="DELETE /* deleteSelfExternals */ FROM externallinks WHERE el_to LIKE '$wgServer/%' LIMIT 1000\n"; |
| 12 | + print "Deleting a batch\n"; |
| 13 | + $db->query($q); |
| 14 | + if (!$db->affectedRows()) exit(0); |
| 15 | +} |
| 16 | + |
| 17 | +?> |
Property changes on: branches/wmf-deployment/maintenance/deleteSelfExternals.php |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 18 | + native |