X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryLogEvents.php;h=962d9561300c0ff60f8c62e08cc9263e1a02516b;hb=5ca0cf6e273721684c89d2aceaf314366e9142bc;hp=779868845ab8a87b649b6f86fc9ad1eea3226729;hpb=0ceccf701f539fffd996a0fc8304512918425350;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();