X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fsql.php;h=cc976ed97fb84792ddc93e0fe24c5358e9697882;hb=a2f369cbdf97b9f4d32dce742862e0dd181fe7e8;hp=a9fe45ae13e11dc28ea137b065c21f9afac01976;hpb=b1feb5cb42cbebd68c61a2abf0d6f1befccccef6;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/sql.php b/maintenance/sql.php index a9fe45ae13..cc976ed97f 100644 --- a/maintenance/sql.php +++ b/maintenance/sql.php @@ -80,13 +80,18 @@ class MwSql extends Maintenance { $this->error( "The server selected ({$db->getServer()}) is not a replica DB.", 1 ); } + if ( $index === DB_MASTER ) { + $updater = DatabaseUpdater::newForDB( $db, true, $this ); + $db->setSchemaVars( $updater->getSchemaVars() ); + } + if ( $this->hasArg( 0 ) ) { $file = fopen( $this->getArg( 0 ), 'r' ); if ( !$file ) { $this->error( "Unable to open input file", true ); } - $error = $db->sourceStream( $file, false, [ $this, 'sqlPrintResult' ] ); + $error = $db->sourceStream( $file, null, [ $this, 'sqlPrintResult' ] ); if ( $error !== true ) { $this->error( $error, true ); } else {