Skip to content

Commit

Permalink
cats: Add DISTINCT to SQL query to avoid listing duplicate volume rec…
Browse files Browse the repository at this point in the history
…ords
  • Loading branch information
fbergkemper committed Dec 2, 2019
1 parent 4eb5c96 commit 14bd30d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/cats/sql_list.cc
Expand Up @@ -343,7 +343,7 @@ void BareosDb::ListVolumesOfJobid(JobControlRecord* jcr,
edit_int64(JobId, ed1));
} else {
Mmsg(cmd,
"SELECT Media.VolumeName "
"SELECT DISTINCT Media.VolumeName "
"FROM JobMedia,Media WHERE Media.MediaId=JobMedia.MediaId "
"AND JobMedia.JobId=%s",
edit_int64(JobId, ed1));
Expand Down

0 comments on commit 14bd30d

Please sign in to comment.