Changeset 10772
- Timestamp:
- Dec 15, 2006, 5:47:34 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/warptool.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/warptool.c
r10771 r10772 332 332 } 333 333 if (!psArrayLength(output)) { 334 // XXX check psError here335 334 psError(PS_ERR_UNKNOWN, false, "no p4InputImfile rows found"); 336 335 psFree(output); … … 475 474 } 476 475 if (!psArrayLength(output)) { 477 // XXX check psError here478 476 psError(PS_ERR_UNKNOWN, false, "no p4WarpedImfile rows found"); 479 477 psFree(output); … … 509 507 psString query = psStringCopy( 510 508 " SELECT DISTINCT" 511 " p4InputImfile.p4_id," 512 " p2ProcessedImfile.*" 509 " p4WarpedImfile.*" 513 510 " FROM p4Run" 514 511 " JOIN p4WarpedImfile" … … 541 538 } 542 539 if (!psArrayLength(output)) { 543 // XXX check psError here544 540 psError(PS_ERR_UNKNOWN, false, "no p4WarpedImfile rows found"); 545 541 psFree(output); … … 665 661 } 666 662 if (!psArrayLength(output)) { 667 // XXX check psError here668 663 psError(PS_ERR_UNKNOWN, false, "no p4StackedImfile rows found"); 669 664 psFree(output); … … 696 691 { 697 692 PS_ASSERT_PTR_NON_NULL(config, NULL); 693 694 psString query = psStringCopy( 695 " SELECT DISTINCT" 696 " p4StackedImfile.*," 697 " p4WarpedImfile.uri as warped_uri" 698 " FROM p4Run" 699 " JOIN p4StackedImfile" 700 " USING(p4_id)" 701 " JOIN p4WarpedImfile" 702 " USING(p4_id, class_id)" 703 " LEFT JOIN p4DiffImfile" 704 " ON p4WarpedImfile.p4_id = p4DiffImfile.p4_id" 705 " AND p4WarpedImfile.exp_tag = p4DiffImfile.exp_tag" 706 " AND p4WarpedImfile.p3_version = p4DiffImfile.p3_version" 707 " AND p4WarpedImfile.class_id = p4DiffImfile.class_id" 708 " WHERE" 709 " p4Run.state = 'run'" 710 " AND p4DiffImfile.p4_id IS NULL" 711 " AND p4DiffImfile.exp_tag IS NULL" 712 " AND p4DiffImfile.p3_version IS NULL" 713 " AND p4DiffImfile.class_id IS NULL" 714 ); 715 716 if (config->where) { 717 psString whereClause = psDBGenerateWhereConditionSQL(config->where, "p4StackedImfile"); 718 psStringAppend(&query, " AND %s", whereClause); 719 psFree(whereClause); 720 } 721 722 if (!p_psDBRunQuery(config->dbh, query)) { 723 psError(PS_ERR_UNKNOWN, false, "database error"); 724 psFree(query); 725 return false; 726 } 727 psFree(query); 728 729 psArray *output = p_psDBFetchResult(config->dbh); 730 if (!output) { 731 psError(PS_ERR_UNKNOWN, false, "database error"); 732 return false; 733 } 734 if (!psArrayLength(output)) { 735 psError(PS_ERR_UNKNOWN, false, "no p4StackedImfile rows found"); 736 psFree(output); 737 return true; 738 } 739 740 bool simple = false; 741 { 742 bool status = false; 743 simple = psMetadataLookupBool(&status, config->args, "-simple"); 744 if (!status) { 745 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -simple"); 746 return false; 747 } 748 } 749 750 // negative simple so the default is true 751 if (!ippdbPrintMetadatas(stdout, output, "p4StackedImfile", !simple)) { 752 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 753 psFree(output); 754 return false; 755 } 756 757 psFree(output); 698 758 699 759 return true; … … 815 875 } 816 876 if (!psArrayLength(output)) { 817 // XXX check psError here818 877 psError(PS_ERR_UNKNOWN, false, "no p4DiffImfile rows found"); 819 878 psFree(output);
Note:
See TracChangeset
for help on using the changeset viewer.
