From: Aaron Schulz Date: Sat, 9 Sep 2017 21:05:58 +0000 (-0700) Subject: Remove implicitGroupby() use in ImageListPager X-Git-Tag: 1.31.0-rc.0~2054^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=c02c962bf06899ebfa73afff9e9f59901d706198;p=lhc%2Fweb%2Fwiklou.git Remove implicitGroupby() use in ImageListPager Note this only effects wikis with miser mode disabled, so there is less risk of a poor query plan. Change-Id: I692b23f176489b9a0907bcc65b4ca93f10367c48 --- diff --git a/includes/specials/pagers/ImageListPager.php b/includes/specials/pagers/ImageListPager.php index 813d1d44c0..1c46f4c3c2 100644 --- a/includes/specials/pagers/ImageListPager.php +++ b/includes/specials/pagers/ImageListPager.php @@ -286,13 +286,8 @@ class ImageListPager extends TablePager { } unset( $field ); - $dbr = wfGetDB( DB_REPLICA ); - if ( $dbr->implicitGroupby() ) { - $options = [ 'GROUP BY' => 'img_name' ]; - } else { - $columnlist = preg_grep( '/^img/', array_keys( $this->getFieldNames() ) ); - $options = [ 'GROUP BY' => array_merge( [ 'img_user' ], $columnlist ) ]; - } + $columnlist = preg_grep( '/^img/', array_keys( $this->getFieldNames() ) ); + $options = [ 'GROUP BY' => array_merge( [ 'img_user' ], $columnlist ) ]; $join_conds = [ 'oldimage' => [ 'LEFT JOIN', 'oi_name = img_name' ] ]; }