]> git.sur5r.net Git - bacula/bacula/commitdiff
purge basefiles at the same time than files
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 30 Jul 2009 08:17:38 +0000 (10:17 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 3 Aug 2009 14:39:19 +0000 (16:39 +0200)
bacula/src/dird/ua_purge.c

index ec09f36cdd7ddb4769833cc9c91d28257e15390c..f31b577af8c93423921baee57d1f6314a0bd1fb8 100644 (file)
@@ -283,6 +283,10 @@ void purge_files_from_jobs(UAContext *ua, char *jobs)
    db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
    Dmsg1(050, "Delete File sql=%s\n", query.c_str());
 
+   Mmsg(query, "DELETE FROM BaseFiles WHERE JobId IN (%s)", jobs);
+   db_sql_query(ua->db, query.c_str(), NULL, (void *)NULL);
+   Dmsg1(050, "Delete BaseFiles sql=%s\n", query.c_str());
+
    /*
     * Now mark Job as having files purged. This is necessary to
     * avoid having too many Jobs to process in future prunings. If