Merge "Remove logging table index hint"

This commit is contained in:
jenkins-bot 2021-06-28 16:03:00 +00:00 committed by Gerrit Code Review
commit 4afd20e1ba
2 changed files with 0 additions and 15 deletions

View file

@ -183,13 +183,6 @@ class ApiQueryLogEvents extends ApiQueryBase {
$user = $params['user'];
if ( $user !== null ) {
$this->addWhereFld( 'actor_name', $user );
// Remove after T270620 is resolved.
$index = $db->indexExists( 'logging', 'times', __METHOD__ ) ? 'times' : 'log_times';
// T71222: MariaDB's optimizer, at least 10.1.37 and .38, likes to choose a wildly bad plan for
// some reason for this code path. Tell it not to use the wrong index it wants to pick.
$this->addOption( 'IGNORE INDEX', [ 'logging' => [ $index ] ] );
}
$title = $params['title'];

View file

@ -379,14 +379,6 @@ class LogPager extends ReverseChronologicalPager {
if ( !$this->mTagFilter && !array_key_exists( 'ls_field', $this->mConds ) ) {
$options[] = 'STRAIGHT_JOIN';
}
if ( $this->performer !== '' || $this->types !== [] ) {
// Index being renamed
$index = $this->mDb->indexExists( 'logging', 'times', __METHOD__ ) ? 'times' : 'log_times';
// T223151, T237026: MariaDB's optimizer, at least 10.1, likes to choose a wildly bad plan for
// some reason for these code paths. Tell it not to use the wrong index it wants to pick.
$options['IGNORE INDEX'] = [ 'logging' => [ $index ] ];
}
$info = [
'tables' => $tables,