"Catrope" posted a comment on MediaWiki.r108556. URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/108556#c29322
Commit summary for MediaWiki.r108556: followup to -r108187 - Introducing new field mbf_latest_response for latest feedback response and feedback without responses Catrope's comment: <pre> + $res = $db->select( array( 'moodbar_feedback', 'moodbar_feedback_response' ), + array( 'MAX(mbfr_id) AS latest_mbfr_id', 'mbf_id' ), + array( 'mbf_id=mbfr_mbf_id', 'mbf_latest_response' => 0 ), + __METHOD__, + array( 'GROUP BY' => 'mbfr_mbf_id' ) + ); </pre> Per IRC convo, this query needs to be batched rather than fetching all rows at once. <pre> + array( 'mbf_id=mbfr_mbf_id', 'mbf_latest_response' => 0 ), </pre> You're assuming unfilled rows will have 0 here. I would feel safer if the column definition included an explicit <code>DEFAULT 0</code> . OK otherwise. _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
