$conds + $subconds,
__METHOD__,
$order + $query_options,
- $join_conds + [ $link_table => [ 'INNER JOIN', $subjoin ] ]
+ $join_conds + [ $link_table => [ 'JOIN', $subjoin ] ]
);
if ( $dbr->unionSupportsOrderAndLimit() ) {
$sql = $subsql[0];
} else {
// need to resort and relimit after union
- $sql = $dbr->unionQueries( $subsql, false ) . ' ORDER BY rc_timestamp DESC';
+ $sql = $dbr->unionQueries( $subsql, $dbr::UNION_DISTINCT ) .
+ ' ORDER BY rc_timestamp DESC';
$sql = $dbr->limitResult( $sql, $limit, false );
}