* FiveUpgrade: large table hacks, install iw_trans update before links
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 3 Jul 2005 09:05:35 +0000 (09:05 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 3 Jul 2005 09:05:35 +0000 (09:05 +0000)
RELEASE-NOTES
maintenance/FiveUpgrade.inc

index 6e5e23c..beead2a 100644 (file)
@@ -454,6 +454,7 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new.
 * Fix diff order on Enhanced RC 'changes' link
 * (bug 2650) Fix national date type display on wikis that don't support
   dynamic date conversion.
+* FiveUpgrade: large table hacks, install iw_trans update before links
 
 
 === Caveats ===
index b509c40..34a0929 100644 (file)
@@ -431,7 +431,8 @@ class FiveUpgrade {
                 */
                #$newmaxold = $this->dbw->selectField( 'old', 'max(old_id)', '', $fname );
                #$this->setChunkScale( $chunksize, $newmaxold, 'revision', $fname );
-               $countold = $this->dbw->selectField( 'old', 'count(old_id)', '', $fname );
+               #$countold = $this->dbw->selectField( 'old', 'count(old_id)', '', $fname );
+               $countold = $this->dbw->selectField( 'old', 'max(old_id)', '', $fname );
                $this->setChunkScale( $chunksize, $countold, 'revision', $fname );
                
                $this->log( "......Setting up revision table." );
@@ -484,7 +485,8 @@ class FiveUpgrade {
                                'page_touched'      =>              $this->dbw->timestamp(),
                                'page_latest'       =>              $row->rev_id,
                                'page_len'          =>              $row->len );
-                       $this->addChunk( $add, $row->cur_id );
+                       #$this->addChunk( $add, $row->cur_id );
+                       $this->addChunk( $add );
                }
                $this->lastChunk( $add );
                $this->dbr->freeResult( $result );
@@ -497,6 +499,15 @@ class FiveUpgrade {
                $chunksize = 200;
                extract( $this->dbw->tableNames( 'links', 'brokenlinks', 'pagelinks', 'cur' ) );
                
+               $this->log( 'Checking for interwiki table change in case of bogus items...' );
+               if( $this->dbw->fieldExists( 'interwiki', 'iw_trans' ) ) {
+                       $this->log( 'interwiki has iw_trans.' );
+               } else {
+                       $this->log( 'adding iw_trans...' );
+                       dbsource( 'maintenance/archives/patch-interwiki-trans.sql', $this->dbw );
+                       $this->log( 'added iw_trans.' );
+               }
+               
                $this->log( 'Creating pagelinks table...' );
                $this->dbw->query( "
 CREATE TABLE $pagelinks (