IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 31, 2012, 11:38:18 AM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20120627/ippTools/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20120627/ippTools/src

  • branches/eam_branches/ipp-20120627/ippTools/src/disttool.c

    r34081 r34241  
    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.