Merge "SearchInputWidget: Replace pushPending hack"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 2 May 2019 19:08:50 +0000 (19:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 2 May 2019 19:08:50 +0000 (19:08 +0000)
includes/logging/LogPager.php

index 0eeb544..4ecc368 100644 (file)
@@ -337,9 +337,9 @@ class LogPager extends ReverseChronologicalPager {
 
                // T221458: 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 tag filtering was used, as it seems as likely
-               // to be harmed as helped in that case.
-               if ( !$this->mTagFilter ) {
+               // Tell it not to reorder the query. But not when tag filtering or log_search was used, as it
+               // seems as likely to be harmed as helped in that case.
+               if ( !$this->mTagFilter && !array_key_exists( 'ls_field', $this->mConds ) ) {
                        $options[] = 'STRAIGHT_JOIN';
                }