r81100 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81099‎ | r81100 | r81101 >
Date:20:25, 27 January 2011
Author:overlordq
Status:ok (Comments)
Tags:
Comment:
Followup r81067, use the right syntax for doing a join
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1002,7 +1002,7 @@
10031003 $lb->constructSet( 'page', $dbr ),
10041004 __METHOD__,
10051005 array(),
1006 - array( 'page_props' => array( 'LEFT JOIN' => array( "pp_propname='hiddencat'", "pp_page=page_id" ) ) )
 1006+ array( 'page_props' => array( 'LEFT JOIN', "pp_propname='hiddencat' AND pp_page=page_id" ) )
10071007 );
10081008
10091009 # Add the results to the link cache

Follow-up revisions

RevisionCommit summaryAuthorDate
r81169Follow up r81100. Don't hardcode hiddencat quotes, per r80936 CR.platonides22:17, 28 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81067Fixup query fail from r80936reedy23:13, 26 January 2011

Comments

#Comment by Reedy (talk | contribs)   20:47, 27 January 2011

Thankyou!

#Comment by Nikerabbit (talk | contribs)   21:00, 27 January 2011

Looks better now:

0.2713 Query 38 (slave): SELECT /* OutputPage::addCategoryLinks Nike */ page_id,page_namespace,page_title,page_len,page_is_redirect,page_latest,pp_value FROM `bw_page` LEFT JOIN `bw_page_props` ON ((pp_propname='hiddencat' AND pp_page=page_id)) WHERE (page_namespace = '14' AND page_title IN ('User_vi','User_vi-N','User_vi-5','User_vi-4','User_vi-3','User_vi-2','User_vi-1','User_vi-0','ISO_15924:Latn','Languages','Languages_with_a_Wikipedia_project','Languages_with_a_Wiktionary_project') )

#Comment by Platonides (talk | contribs)   22:16, 27 January 2011

It produces the following query now:

SELECT  page_id,page_namespace,page_title,page_len,page_is_redirect,page_latest,pp_value  FROM `page` LEFT JOIN `page_props` ON ((pp_propname='hiddencat' AND pp_page=page_id))  WHERE $where

which is the same as the earlier query pre-r80936:

SELECT page_id, page_namespace, page_title, page_len, page_is_redirect, page_latest, pp_value FROM $pageTable LEFT JOIN $propsTable ON pp_propname='hiddencat' AND pp_page=page_id WHERE $where

Marking as ok. Good work, overlordq.

Status & tagging log