X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fapi%2FApiQueryLogEvents.php;h=779868845ab8a87b649b6f86fc9ad1eea3226729;hb=4cebf80a894f1bc9f9e2f732c8b78d5237810343;hp=0934ab391df6eb95a895b34eb3c1421611eb7446;hpb=d6e366a318a2fedf88533456b71f91cb5c52c5e6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 0934ab391d..779868845a 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -112,7 +112,7 @@ class ApiQueryLogEvents extends ApiQueryBase { if ( !is_null( $params['tag'] ) ) { $this->addTables( 'change_tag' ); - $this->addJoinConds( [ 'change_tag' => [ 'INNER JOIN', + $this->addJoinConds( [ 'change_tag' => [ 'JOIN', [ 'log_id=ct_log_id' ] ] ] ); $changeTagDefStore = MediaWikiServices::getInstance()->getChangeTagDefStore(); try { @@ -183,6 +183,10 @@ class ApiQueryLogEvents extends ApiQueryBase { $db, 'log_user', User::newFromName( $params['user'], false ) ); $this->addWhere( $q['conds'] ); + + // 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' => [ 'times' ] ] ); } $title = $params['title'];