Among other changes, note that Latin-1 encoding (ISO-8859-1) is
no longer supported. Latin-1 wikis will need to be upgraded to
-UTF-8, however the updater has not yet been updated to support
-this automatically.
+UTF-8; an experimental command-line upgrade helper script,
+'upgrade1_5.php', can do this -- run it prior to 'update.php' or
+the web upgrader.
Message changes:
* A number of additional UI messages have been chagned from HTML to
function FiveUpgrade() {
global $wgDatabase;
$this->conversionTables = $this->prepareWindows1252();
+
$this->dbw =& $this->newConnection();
$this->dbr =& $this->newConnection();
$this->dbr->bufferResults( false );
- $this->cleanupSwaps = array();
+ $this->slave =& wfGetDB( DB_SLAVE );
+ $this->cleanupSwaps = array();
$this->emailAuth = false; # don't preauthenticate emails
+ $this->maxLag = 10; # if slaves are lagged more than 10 secs, wait
}
function doing( $step ) {
* @access private
*/
function insertChunk( &$chunk ) {
+ // Give slaves a chance to catch up
+ wfWaitForSlaves( $this->maxLag );
$this->dbw->insert( $this->chunkTable, $chunk, $this->chunkFunction, $this->chunkOptions );
}
$fname = "FiveUpgrade::upgradePage";
$chunksize = 100;
-
+ if( $this->dbw->tableExists( 'page' ) ) {
+ $this->log( 'Page table already exists; aborting.' );
+ die( -1 );
+ }
+
$this->log( "Checking cur table for unique title index and applying if necessary" );
checkDupes( true );