IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34235


Ignore:
Timestamp:
Jul 31, 2012, 10:42:55 AM (14 years ago)
Author:
bills
Message:

In -startover mode delete any existing dsFileset entries.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/disttool.c

    r34081 r34235  
    743743
    744744    query = "DELETE FROM distComponent where dist_id = %" PRId64;
     745    char *query2 =  "DELETE from rcDSFileset using distRun, rcDSFileset WHERE distRun.dist_id = rcDSFileset.dist_id AND rcDSFileset.state ='cleaned' AND dist_id = %" PRId64;
    745746   
    746747    for (long i=0; i < psArrayLength(output); i++) {
     
    753754        }
    754755
     756        // delete any existing distComponents
    755757        if (!p_psDBRunQueryF(config->dbh, query, dist_id)) {
     758            psError(PS_ERR_UNKNOWN, false, "database error");
     759            psFree(query);
     760            if (!psDBRollback(config->dbh)) {
     761                psError(PS_ERR_UNKNOWN, false, "database error");
     762            }
     763            return false;
     764        }
     765        // delete any exisiting fileset
     766        if (!p_psDBRunQueryF(config->dbh, query2, dist_id)) {
    756767            psError(PS_ERR_UNKNOWN, false, "database error");
    757768            psFree(query);
Note: See TracChangeset for help on using the changeset viewer.