IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 6, 2009, 2:26:38 PM (17 years ago)
Author:
Paul Price
Message:

Following the reworked diff schema, a diffRun may have state 'new'
even if its components have failed. In that case, the delete and
update parts of revertdiffskyfile would alter a different number of
rows (or no rows would be updated at all), causing an error. But it's
not an error, so removed the check which is no longer valid.

File:
1 edited

Legend:

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

    r21308 r21399  
    655655    }
    656656
    657     int num;                            // Number affected
    658 
    659657    // Update state to 'new'
    660658    {
     
    684682        psFree(query);
    685683
    686         num = psDBAffectedRows(config->dbh);
    687 
    688         if (num < 1) {
    689             psError(PS_ERR_UNKNOWN, false, "should have affected atleast 1 row");
    690             if (!psDBRollback(config->dbh)) {
    691                 psError(PS_ERR_UNKNOWN, false, "database error");
    692             }
    693             return false;
    694         }
     684        psLogMsg("diftool", PS_LOG_INFO, "Updated %" PRIu64 " rows", psDBAffectedRows(config->dbh));
    695685    }
    696686
     
    722712        psFree(query);
    723713
    724         if (psDBAffectedRows(config->dbh) != num) {
    725             psError(PS_ERR_UNKNOWN, false, "Updated and deleted different number of entries!");
    726             if (!psDBRollback(config->dbh)) {
    727                 psError(PS_ERR_UNKNOWN, false, "database error");
    728             }
    729             return false;
    730         }
     714        psLogMsg("difftool", PS_LOG_INFO, "Deleted %" PRIu64 " rows", psDBAffectedRows(config->dbh));
    731715    }
    732716
Note: See TracChangeset for help on using the changeset viewer.