Changeset 26180 for trunk/ippTools
- Timestamp:
- Nov 18, 2009, 10:11:43 AM (17 years ago)
- Location:
- trunk/ippTools
- Files:
-
- 2 edited
-
share/difftool_inputskyfile.sql (modified) (4 diffs)
-
src/difftool.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/difftool_inputskyfile.sql
r26179 r26180 29 29 JOIN rawExp 30 30 USING(exp_id) 31 WHERE32 (diffRun.state = 'new' or diffRun.state = 'full')33 AND (warpRun.state = 'full')34 31 -- where hook %s 35 32 UNION … … 63 60 JOIN rawExp 64 61 USING(exp_id) 65 WHERE66 (diffRun.state = 'new' or diffRun.state = 'full')67 AND (warpRun.state = 'full')68 62 -- where hook %s 69 63 UNION … … 97 91 JOIN rawExp 98 92 USING(exp_id) 99 WHERE100 (diffRun.state = 'new' or diffRun.state = 'full')101 93 -- where hook %s 102 94 UNION … … 130 122 JOIN rawExp 131 123 USING(exp_id) 132 WHERE133 (diffRun.state = 'new' or diffRun.state = 'full')134 124 -- where hook %s 135 125 ) as Foo 126 -- template where hook %s -
trunk/ippTools/src/difftool.c
r26177 r26180 386 386 if (psListLength(where->list)) { 387 387 whereClause = psDBGenerateWhereConditionSQL(where, NULL); 388 psStringPrepend(&whereClause, "\n AND");388 psStringPrepend(&whereClause, "\n WHERE "); 389 389 } 390 390 psFree(where); 391 391 392 392 // Add condition to get only templates or only inputs 393 psString templateClause = NULL; 393 394 { 394 psString templateClause = NULL;395 395 if (template) { 396 psStringAppend(&templateClause, " %s", " template != 0");396 psStringAppend(&templateClause, "\n WHERE %s", " template != 0"); 397 397 } else if (input) { 398 psStringAppend(&templateClause, " %s", " template = 0"); 399 } 400 if (templateClause) { 401 psStringAppend(&whereClause, "\n AND %s", templateClause); 402 } 403 psFree(templateClause); 398 psStringAppend(&templateClause, "\n WHERE %s", " template = 0"); 399 } 404 400 } 405 401 … … 412 408 } 413 409 414 if (!p_psDBRunQueryF(config->dbh, query, whereClause, whereClause, whereClause, whereClause)) { 415 psError(PS_ERR_UNKNOWN, false, "database error"); 410 if (!p_psDBRunQueryF(config->dbh, query, whereClause, whereClause, whereClause, whereClause, templateClause)) { 411 psError(PS_ERR_UNKNOWN, false, "database error"); 412 psFree(templateClause); 416 413 psFree(whereClause); 417 414 psFree(query); 418 415 return false; 419 416 } 417 psFree(templateClause); 420 418 psFree(whereClause); 421 419 psFree(query);
Note:
See TracChangeset
for help on using the changeset viewer.
