IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 25, 2009, 2:00:56 PM (17 years ago)
Author:
eugene
Message:

merging changes from head

Location:
branches/eam_branches/20090522
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090522

  • branches/eam_branches/20090522/ippTools/src

    • Property svn:ignore
      •  

        old new  
        3434disttool
        3535receivetool
         36
         37pubtool
  • branches/eam_branches/20090522/ippTools/src/disttool.c

    r24125 r24557  
    488488    PXOPT_COPY_STR(config->args, where, "-state", "state", "==");
    489489    PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
    490     PXOPT_COPY_S16(config->args, where, "-fault", "fault", "==");
     490
     491    // we need to disambiguate fault so make a copy of the where list before adding fault
     492    psMetadata *whereComponent = psMetadataCopy(NULL, where);
     493    PXOPT_COPY_S16(config->args, where,  "-fault", "distRun.fault", "==");
     494    PXOPT_COPY_S16(config->args, whereComponent, "-fault", "distComponent.fault", "==");
    491495
    492496    // It might be useful to be able to query by the parameters of the underlying runs
     
    533537
    534538        numUpdated = psDBAffectedRows(config->dbh);
    535 
    536 #ifdef notdef
    537         // don't need this. distRun.state may still be in 'new' state
    538         if (numUpdated < 1) {
    539             psError(PS_ERR_UNKNOWN, false, "should have affected at least 1 row");
    540             if (!psDBRollback(config->dbh)) {
    541                 psError(PS_ERR_UNKNOWN, false, "database error");
    542             }
    543             return false;
    544         }
    545 #endif
    546539    }
    547540
     
    560553        }
    561554
    562         if (psListLength(where->list)) {
    563             psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
     555        if (psListLength(whereComponent->list)) {
     556            psString whereClause = psDBGenerateWhereConditionSQL(whereComponent, NULL);
    564557            psStringAppend(&query, " AND %s", whereClause);
    565558            psFree(whereClause);
     
    582575
    583576    psFree(where);
     577    psFree(whereComponent);
    584578
    585579    if (!psDBCommit(config->dbh)) {
     
    598592    PXOPT_COPY_S64(config->args, where, "-dist_id", "dist_id", "==");
    599593    PXOPT_COPY_STR(config->args, where, "-stage", "stage", "==");
    600     PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
     594    pxAddLabelSearchArgs (config, where, "-label", "label", "==");
    601595
    602596    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
     
    719713    psMetadata *where = psMetadataAlloc();
    720714    PXOPT_COPY_S64(config->args, where, "-dist_id", "dist_id", "==");
    721     PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
     715    pxAddLabelSearchArgs (config, where, "-label", "label", "==");
    722716
    723717    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
     
    863857    psMetadata *where = psMetadataAlloc();
    864858    PXOPT_COPY_S64(config->args, where, "-dist_id", "dist_id", "==");
    865     PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
     859    pxAddLabelSearchArgs (config, where, "-label", "label", "==");
    866860
    867861    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
Note: See TracChangeset for help on using the changeset viewer.