IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37974 for trunk/ippTools/src


Ignore:
Timestamp:
Mar 12, 2015, 3:57:12 PM (11 years ago)
Author:
watersc1
Message:

Yet another change to difftool -definewarpstack that is needed to fix problems in the query process. This corrects the problem requeuing a warp_id/stack_id combination that already has an entry in diffInputSkyfile. The results match what was created in the previous version, but are now not blocked when the diffRun.label is changed, and now respects the -rerun (if you really want to do something twice with the same label). This also corrects an issue where filter was ambiguous in the query, preventing that from being used.

File:
1 edited

Legend:

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

    r37947 r37974  
    12351235
    12361236  PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "==");
    1237   PXOPT_COPY_STR(config->args, where, "-filter", "filter", "==");
     1237  PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "==");
    12381238  PXOPT_COPY_STR(config->args, where, "-comment", "comment", "LIKE");
    12391239  PXOPT_COPY_S64(config->args, where, "-warp_id", "warpRun.warp_id", "==");
     
    12841284
    12851285  psString whereClause = psDBGenerateWhereConditionSQL(where,NULL);
     1286  psString diffWhereClause = psStringCopy("");
     1287  psString joinWhereClause = psStringCopy("");
    12861288 
    12871289  // Don't queue things that already have diffs.
    12881290  if (! (reRun || newTemplates) ) {
    1289     psStringAppend(&whereClause, "\nAND diff_id IS NULL\n");
     1291    psStringAppend(&joinWhereClause, "\nAND diff_id IS NULL\n");
    12901292  }
    12911293  // Append diff qualifiers, if we have them
    12921294  if (label) {
    1293     psStringAppend(&whereClause, "\nAND ((diffRun.label = '%s') OR (diffRun.label IS NULL))",label);
     1295    psStringAppend(&diffWhereClause, "\nAND ((diffRun.label = '%s') OR (diffRun.label IS NULL))",label);
    12941296  }
    12951297  if (data_group) {
    1296     psStringAppend(&whereClause, "\nAND ((diffRun.data_group = '%s') OR (diffRun.data_group IS NULL))",data_group);
     1298    psStringAppend(&diffWhereClause, "\nAND ((diffRun.data_group = '%s') OR (diffRun.data_group IS NULL))",data_group);
    12971299  }
    12981300  if (reduction) {
    1299     psStringAppend(&whereClause, "\nAND ((diffRun.reduction = '%s') OR (diffRun.reduction IS NULL))",reduction);
     1301    psStringAppend(&diffWhereClause, "\nAND ((diffRun.reduction = '%s') OR (diffRun.reduction IS NULL))",reduction);
    13001302  }
    13011303
     
    13051307
    13061308  // This is just a simple query, so we don't need to do a transaction
    1307   if (!p_psDBRunQueryF(config->dbh, query, whereClauseString)) {
     1309  if (!p_psDBRunQueryF(config->dbh, query, whereClauseString, diffWhereClause,joinWhereClause)) {
    13081310    psError(PS_ERR_UNKNOWN, false, "database error");
    13091311    psFree(query);
Note: See TracChangeset for help on using the changeset viewer.