]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #5855 Do not promote copy jobs in error when the original job is pruned
authorEric Bollengier <eric@baculasystems.com>
Wed, 29 Jan 2020 11:00:56 +0000 (12:00 +0100)
committerKern Sibbald <kern@sibbald.com>
Fri, 31 Jan 2020 13:49:07 +0000 (14:49 +0100)
bacula/src/cats/sql_cmds.c

index cda9fa591218ed0b16b58a5fef768e7f320014d8..d5b8f41171d1bbbce83bda7309dd8247a8e6f3ed 100644 (file)
@@ -527,7 +527,7 @@ static const char *uap_upgrade_copies_oldest_job_default =
                   "SELECT PriorJobId "
                     "FROM Job "
                    "WHERE JobId IN (%s) "         /* JobId selection */
-                    " AND Type='B' "
+                    " AND Type='B' AND JobStatus IN ('T', 'W') "
                  ") "
               ") "
           "GROUP BY PriorJobId ";           /* one result per copy */