Note this only effects wikis with miser mode disabled, so there
is less risk of a poor query plan.
Change-Id: I692b23f176489b9a0907bcc65b4ca93f10367c48
- $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' ] ];
}
$join_conds = [ 'oldimage' => [ 'LEFT JOIN', 'oi_name = img_name' ] ];
}