dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "cache: Minor docs for MessageCache interaction with WANObjectCache"
[lhc/web/wiklou.git]
/
maintenance
/
populateContentTables.php
diff --git
a/maintenance/populateContentTables.php
b/maintenance/populateContentTables.php
index
eee534f
..
20d6b8b
100644
(file)
--- a/
maintenance/populateContentTables.php
+++ b/
maintenance/populateContentTables.php
@@
-72,9
+72,10
@@
class PopulateContentTables extends Maintenance {
$t0 = microtime( true );
$t0 = microtime( true );
- if (
$wgMultiContentRevisionSchemaMigrationStage < MIGRATION_WRITE_BOTH
) {
+ if (
( $wgMultiContentRevisionSchemaMigrationStage & SCHEMA_COMPAT_WRITE_NEW ) === 0
) {
$this->writeln(
$this->writeln(
- "...cannot update while \$wgMultiContentRevisionSchemaMigrationStage < MIGRATION_WRITE_BOTH"
+ '...cannot update while \$wgMultiContentRevisionSchemaMigrationStage '
+ . 'does not have the SCHEMA_COMPAT_WRITE_NEW bit set.'
);
return false;
}
);
return false;
}
@@
-91,6
+92,7
@@
class PopulateContentTables extends Maintenance {
$elapsed = microtime( true ) - $t0;
$this->writeln( "Done. Processed $this->totalCount rows in $elapsed seconds" );
$elapsed = microtime( true ) - $t0;
$this->writeln( "Done. Processed $this->totalCount rows in $elapsed seconds" );
+ return true;
}
/**
}
/**
@@
-186,6
+188,11
@@
class PopulateContentTables extends Maintenance {
'',
__METHOD__
);
'',
__METHOD__
);
+ if ( !$minmax || !is_numeric( $minmax->min ) || !is_numeric( $minmax->max ) ) {
+ // No rows?
+ $minmax = (object)[ 'min' => 1, 'max' => 0 ];
+ }
+
$batchSize = $this->getBatchSize();
for ( $startId = $minmax->min; $startId <= $minmax->max; $startId += $batchSize ) {
$batchSize = $this->getBatchSize();
for ( $startId = $minmax->min; $startId <= $minmax->max; $startId += $batchSize ) {