Changeset 18561 for trunk/ippTools/src/stacktool.c
- Timestamp:
- Jul 15, 2008, 10:30:59 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/stacktool.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/stacktool.c
r18336 r18561 524 524 PS_ASSERT_PTR_NON_NULL(config, false); 525 525 526 psMetadata *where = psMetadataAlloc(); 527 PXOPT_COPY_S64(config->args, where, "-warp_id", "warp_id", "=="); 528 PXOPT_COPY_S64(config->args, where, "-stack_id", "stack_id", "=="); 529 526 530 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 527 531 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); … … 533 537 } 534 538 535 if ( config->where) {536 psString whereClause = psDBGenerateWhereConditionSQL( config->where, "stackInputSkyfile");539 if (psListLength(where->list)) { 540 psString whereClause = psDBGenerateWhereConditionSQL(where, "stackInputSkyfile"); 537 541 psStringAppend(&query, " AND %s", whereClause); 538 542 psFree(whereClause); 539 543 } 544 psFree(where); 540 545 541 546 // treat limit == 0 as "no limit" … … 592 597 PS_ASSERT_PTR_NON_NULL(config, false); 593 598 599 psMetadata *where = psMetadataAlloc(); 600 PXOPT_COPY_S64(config->args, where, "-warp_id", "warp_id", "=="); 601 PXOPT_COPY_S64(config->args, where, "-stack_id", "stack_id", "=="); 602 594 603 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 595 604 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); … … 601 610 } 602 611 603 if ( config->where) {604 psString whereClause = psDBGenerateWhereConditionSQL( config->where, "stackSumSkyfile");612 if (psListLength(where->list)) { 613 psString whereClause = psDBGenerateWhereConditionSQL(where, "stackSumSkyfile"); 605 614 psStringAppend(&query, " AND %s", whereClause); 606 615 psFree(whereClause); 607 616 } 617 psFree(where); 608 618 609 619 // treat limit == 0 as "no limit" … … 723 733 PS_ASSERT_PTR_NON_NULL(config, false); 724 734 735 psMetadata *where = psMetadataAlloc(); 736 PXOPT_COPY_S64(config->args, where, "-warp_id", "warp_id", "=="); 737 PXOPT_COPY_S64(config->args, where, "-stack_id", "stack_id", "=="); 738 725 739 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 726 740 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); … … 732 746 } 733 747 734 if ( config->where) {735 psString whereClause = psDBGenerateWhereConditionSQL( config->where, "stackSumSkyfile");748 if (psListLength(where->list)) { 749 psString whereClause = psDBGenerateWhereConditionSQL(where, "stackSumSkyfile"); 736 750 psStringAppend(&query, " AND %s", whereClause); 737 751 psFree(whereClause); 738 752 } 753 psFree(where); 739 754 740 755 // treat limit == 0 as "no limit" … … 790 805 PS_ASSERT_PTR_NON_NULL(config, false); 791 806 807 psMetadata *where = psMetadataAlloc(); 808 PXOPT_COPY_S64(config->args, where, "-stack_id", "stack_id", "=="); 809 PXOPT_COPY_S16(config->args, where, "-code", "fault", "=="); 810 792 811 psString query = pxDataGet("stacktool_revertsumskyfile.sql"); 793 812 if (!query) { … … 796 815 } 797 816 798 if ( config->where) {799 psString whereClause = psDBGenerateWhereConditionSQL( config->where, "stackSumSkyfile");817 if (psListLength(where->list)) { 818 psString whereClause = psDBGenerateWhereConditionSQL(where, "stackSumSkyfile"); 800 819 psStringAppend(&query, " AND %s", whereClause); 801 820 psFree(whereClause); 802 821 } 822 psFree(where); 803 823 804 824 if (!p_psDBRunQuery(config->dbh, query)) {
Note:
See TracChangeset
for help on using the changeset viewer.
