Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/352623 )

Change subject: Prettify MessageCache::loadFromDB()-small query
......................................................................

Prettify MessageCache::loadFromDB()-small query

Adjust the call so it uses JOIN...ON syntax rather than comma joins.

Bug: T164666
Change-Id: I93c8569620d543e9507d0adf1283443915f50d4b
---
M includes/cache/MessageCache.php
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/352623/1

diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 5caa7d5..c992112 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -515,15 +515,18 @@
 
                # Conditions to load the remaining pages with their contents
                $smallConds = $conds;
-               $smallConds[] = 'page_latest=rev_id';
-               $smallConds[] = 'rev_text_id=old_id';
                $smallConds[] = 'page_len <= ' . intval( 
$wgMaxMsgCacheEntrySize );
 
                $res = $dbr->select(
                        [ 'page', 'revision', 'text' ],
                        [ 'page_title', 'old_id', 'old_text', 'old_flags' ],
                        $smallConds,
-                       __METHOD__ . "($code)-small"
+                       __METHOD__ . "($code)-small",
+                       [],
+                       [
+                               'revision' => [ 'JOIN', 'page_latest=rev_id' ],
+                               'text' => [ 'JOIN', 'rev_text_id=old_id' ],
+                       ]
                );
 
                foreach ( $res as $row ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/352623
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I93c8569620d543e9507d0adf1283443915f50d4b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <bjor...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to