Changeset 14269 for trunk/ippTools/src/dettool.c
- Timestamp:
- Jul 17, 2007, 10:55:24 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/dettool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r14268 r14269 86 86 static bool adddetrunsummaryMode(pxConfig *config); 87 87 static bool detrunsummaryMode(pxConfig *config); 88 static bool revertdetrunsummaryMode(pxConfig *config); 88 89 static bool updatedetrunMode(pxConfig *config); 89 90 static bool rerunMode(pxConfig *config); … … 177 178 MODECASE(DETTOOL_MODE_ADDDETRUNSUMMARY, adddetrunsummaryMode); 178 179 MODECASE(DETTOOL_MODE_DETRUNSUMMARY, detrunsummaryMode); 180 MODECASE(DETTOOL_MODE_REVERTDETRUNSUMMARY, revertdetrunsummaryMode); 179 181 MODECASE(DETTOOL_MODE_UPDATEDETRUN, updatedetrunMode); 180 182 MODECASE(DETTOOL_MODE_RERUN, rerunMode); … … 5997 5999 psFree(output); 5998 6000 6001 // XXX this logic does not deal with the case of -code being set 5999 6002 if (again) { 6000 6003 if (!startNewIteration(config, (psS64)atoll(det_id))) { … … 6177 6180 return true; 6178 6181 } 6182 6183 6184 static bool revertdetrunsummaryMode(pxConfig *config) 6185 { 6186 PS_ASSERT_PTR_NON_NULL(config, false); 6187 6188 psString query = pxDataGet("dettool_revertdetrunsummary.sql"); 6189 if (!query) { 6190 psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement"); 6191 return false; 6192 } 6193 6194 if (config->where) { 6195 psString whereClause = psDBGenerateWhereConditionSQL(config->where, "detRunSummary"); 6196 psStringAppend(&query, " AND %s", whereClause); 6197 psFree(whereClause); 6198 } 6199 6200 if (!p_psDBRunQuery(config->dbh, query)) { 6201 psError(PS_ERR_UNKNOWN, false, "database error"); 6202 psFree(query); 6203 return false; 6204 } 6205 psFree(query); 6206 6207 if (psDBAffectedRows(config->dbh) < 1) { 6208 psError(PS_ERR_UNKNOWN, false, "should have affected atleast 1 row"); 6209 return false; 6210 } 6211 6212 return true; 6213 } 6214 6179 6215 6180 6216 static bool updatedetrunMode(pxConfig *config)
Note:
See TracChangeset
for help on using the changeset viewer.
