metabrainz/musicbrainz-server — pull request #36 by ianmcorvidae (2013-01-24 22:22:25+00:00)
Title: MBS-3457: Improve release->find_by_recordings to not exclude some releases

* it was selecting DISTINCT ON (release.id), meaning that if multiple
recordings being searched appeared on the same release only one would
actually get marked as such
* now is DISTINCT ON (release.id, track.recording) instead

http://tickets.musicbrainz.org/browse/MBS-3457