Keep INNER JOIN when merging relations
#27063

MaxLap wants to merge MaxLap:merge_keep_inner_join into rails:master

We do not currently have an analysis of these two commits