Changeset 24557 for branches/eam_branches/20090522/ippTools/src/disttool.c
- Timestamp:
- Jun 25, 2009, 2:00:56 PM (17 years ago)
- Location:
- branches/eam_branches/20090522
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
ippTools/src (modified) (1 prop)
-
ippTools/src/disttool.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090522
- Property svn:mergeinfo changed
-
branches/eam_branches/20090522/ippTools/src
- Property svn:ignore
-
old new 34 34 disttool 35 35 receivetool 36 37 pubtool
-
- Property svn:ignore
-
branches/eam_branches/20090522/ippTools/src/disttool.c
r24125 r24557 488 488 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); 489 489 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", "=="); 491 495 492 496 // It might be useful to be able to query by the parameters of the underlying runs … … 533 537 534 538 numUpdated = psDBAffectedRows(config->dbh); 535 536 #ifdef notdef537 // don't need this. distRun.state may still be in 'new' state538 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 #endif546 539 } 547 540 … … 560 553 } 561 554 562 if (psListLength(where ->list)) {563 psString whereClause = psDBGenerateWhereConditionSQL(where , NULL);555 if (psListLength(whereComponent->list)) { 556 psString whereClause = psDBGenerateWhereConditionSQL(whereComponent, NULL); 564 557 psStringAppend(&query, " AND %s", whereClause); 565 558 psFree(whereClause); … … 582 575 583 576 psFree(where); 577 psFree(whereComponent); 584 578 585 579 if (!psDBCommit(config->dbh)) { … … 598 592 PXOPT_COPY_S64(config->args, where, "-dist_id", "dist_id", "=="); 599 593 PXOPT_COPY_STR(config->args, where, "-stage", "stage", "=="); 600 PXOPT_COPY_STR(config->args, where, "-label", "label", "==");594 pxAddLabelSearchArgs (config, where, "-label", "label", "=="); 601 595 602 596 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); … … 719 713 psMetadata *where = psMetadataAlloc(); 720 714 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", "=="); 722 716 723 717 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); … … 863 857 psMetadata *where = psMetadataAlloc(); 864 858 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", "=="); 866 860 867 861 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
Note:
See TracChangeset
for help on using the changeset viewer.
