Merge "ExternalLinks: Make order by and continue only rely on el_id in READ NEW"

This commit is contained in:
jenkins-bot 2023-07-05 17:35:47 +00:00 committed by Gerrit Code Review
commit 1cca78c098
3 changed files with 18 additions and 3 deletions

View file

@ -123,7 +123,12 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase {
}
}
$orderBy[] = 'el_id';
if ( $migrationStage & SCHEMA_COMPAT_READ_OLD ) {
$orderBy[] = 'el_id';
} else {
// READ NEW doesn't need this complex continuation
$orderBy = [ 'el_id' ];
}
$this->addOption( 'ORDER BY', $orderBy );
$this->addFields( $orderBy ); // Make sure

View file

@ -114,7 +114,12 @@ class ApiQueryExternalLinks extends ApiQueryBase {
}
}
$orderBy[] = 'el_id';
if ( $migrationStage & SCHEMA_COMPAT_READ_OLD ) {
$orderBy[] = 'el_id';
} else {
// READ NEW doesn't need this complex continuation
$orderBy = [ 'el_id' ];
}
$this->addOption( 'ORDER BY', $orderBy );
$this->addFields( $orderBy ); // Make sure

View file

@ -217,7 +217,12 @@ class SpecialLinkSearch extends QueryPage {
$orderBy[] = $field;
}
$orderBy[] = 'el_id';
if ( $migrationStage & SCHEMA_COMPAT_READ_OLD ) {
$orderBy[] = 'el_id';
} else {
// READ NEW doesn't need this complex continuation
$orderBy = [ 'el_id' ];
}
$retval = [
'tables' => [ 'page', 'externallinks' ],