Changeset 9494 for trunk/ippTools/src/dettool.c
- Timestamp:
- Oct 11, 2006, 3:46:56 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/dettool.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r9489 r9494 1020 1020 { 1021 1021 PS_ASSERT_PTR_NON_NULL(config, false); 1022 1022 1023 1023 // select detProcessedImfile.det_id 1024 1024 // select detRun.iteration … … 1725 1725 1726 1726 psString query = psStringCopy( 1727 "SELECT" 1727 "SELECT" 1728 1728 " det_id," 1729 1729 " det_type," … … 2248 2248 { 2249 2249 PS_ASSERT_PTR_NON_NULL(config, false); 2250 2250 2251 2251 psString query = psStringCopy( 2252 2252 " SELECT DISTINCT" … … 2338 2338 { 2339 2339 PS_ASSERT_PTR_NON_NULL(config, false); 2340 2340 2341 2341 // det_id, recip, -bg, -bg_stdev, & -bg_mean_stdev 2342 2342 // are required … … 2724 2724 2725 2725 if (config->where) { 2726 bool status;2727 int iteration = psMetadataLookupS32 (&status, config->where, "iteration");2728 if (status) {2729 psMetadataRemoveKey (config->where, "iteration");2730 psMetadataAddS32 (config->where, PS_LIST_TAIL, "iteration", 0, "==", iteration);2731 }2726 bool status; 2727 int iteration = psMetadataLookupS32 (&status, config->where, "iteration"); 2728 if (status) { 2729 psMetadataRemoveKey (config->where, "iteration"); 2730 psMetadataAddS32 (config->where, PS_LIST_TAIL, "iteration", 0, "==", iteration); 2731 } 2732 2732 psString whereClause = psDBGenerateWhereConditionSQL(config->where, "detNormalizedImfile"); 2733 2733 psStringAppend(&query, " AND %s", whereClause); … … 3126 3126 " det_type," 3127 3127 " exp_tag," 3128 " include" 3128 " include," 3129 " camera" 3129 3130 " FROM" 3130 3131 " (SELECT DISTINCT" … … 3134 3135 " detInputExp.exp_tag," 3135 3136 " detInputExp.include," 3136 " rawDetrendExp.imfiles" 3137 " rawDetrendExp.imfiles," 3138 " rawDetrendExp.camera" 3137 3139 " FROM detRun" 3138 3140 " LEFT JOIN detInputExp" … … 4118 4120 " WHERE" 4119 4121 " detRun.state = 'run'"); 4120 4121 // XXX this query was not restricted by det_id, resulting 4122 4123 // XXX this query was not restricted by det_id, resulting 4122 4124 // in an inconsistent UPDATE below. I added this AND clause 4123 4125 // though there may be a cleaner method (EAM 2006.10.08) 4124 4126 psStringAppend ( 4125 &query,4126 " AND detRun.det_id = '%s'", det_id);4127 &query, 4128 " AND detRun.det_id = '%s'", det_id); 4127 4129 4128 4130 psStringAppend ( 4129 &query, 4130 " GROUP BY"4131 &query, 4132 " GROUP BY" 4131 4133 " detRun.det_id," 4132 4134 " detRun.iteration," … … 4154 4156 return true; 4155 4157 } 4156 4158 4157 4159 // start a transaction so we don't end up with an incremented iteration 4158 4160 // count but no detInputExps
Note:
See TracChangeset
for help on using the changeset viewer.
