Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F28903585
0001-SECURITY-LogPager-Don-t-STRAIGHT_JOIN-when-using-log.patch
Anomie
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
Anomie
May 2 2019, 4:56 PM
2019-05-02 16:56:35 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
0001-SECURITY-LogPager-Don-t-STRAIGHT_JOIN-when-using-log.patch
View Options
From 3e21da1078e0ad9f5638d6cf982edd553be1f6be Mon Sep 17 00:00:00 2001
From: Brad Jorsch <bjorsch@wikimedia.org>
Date: Thu, 2 May 2019 12:48:46 -0400
Subject: [PATCH] SECURITY: LogPager: Don't STRAIGHT_JOIN when using log_search
We'll hope MariaDB doesn't trigger T221458 in that situation.
Bug: T222324
Change-Id: I06364e9d0bce45bd97b2ec837d1f479feff76699
---
includes/logging/LogPager.php | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php
index 0eeb544eb3..4ecc368d4e 100644
--- a/includes/logging/LogPager.php
+++ b/includes/logging/LogPager.php
@@ -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';
}
--
2.20.1
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7396457
Default Alt Text
0001-SECURITY-LogPager-Don-t-STRAIGHT_JOIN-when-using-log.patch (1 KB)
Attached To
Mode
T222324: Unable to perform revision deletion on Commons
Attached
Detach File
Event Timeline
Log In to Comment