X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryLogEvents.php;h=962d9561300c0ff60f8c62e08cc9263e1a02516b;hb=8963110d01b0f376d900171fe7506fed5df80cf8;hp=779868845ab8a87b649b6f86fc9ad1eea3226729;hpb=7139a95efbbe9e0792f3741fb05b24f30c21d6c6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 779868845a..962d956130 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -238,6 +238,14 @@ class ApiQueryLogEvents extends ApiQueryBase { } } + // T220999: MySQL/MariaDB (10.1.37) can sometimes irrationally decide that querying `actor` before + // `logging` and filesorting is somehow better than querying $limit+1 rows from `logging`. + // Tell it not to reorder the query. But not when `letag` was used, as it seems as likely + // to be harmed as helped in that case. + if ( $params['tag'] === null ) { + $this->addOption( 'STRAIGHT_JOIN' ); + } + $count = 0; $res = $this->select( __METHOD__ ); $result = $this->getResult();