mirror of
https://github.com/elisspace/autopsy.git
synced 2026-10-02 07:19:53 +00:00
VIK-3639 enhancement of query to search for all files which match an md5 from the given datasource.
This commit is contained in:
committed by
Brian Sweeney
parent
f4e1a8612e
commit
bde4ef82bb
@@ -26,7 +26,7 @@ import java.util.Map;
|
||||
*/
|
||||
class SingleDataSource extends CommonFilesMetaDataBuilder {
|
||||
|
||||
private static final String WHERE_CLAUSE = "md5 in (select md5 from tsk_files where data_source_obj_id=%s and (known != 1 OR known IS NULL) GROUP BY md5 HAVING COUNT(*) > 1) AND data_source_obj_id=%s order by md5";
|
||||
private static final String WHERE_CLAUSE = "md5 in (select md5 from tsk_files where md5 in (select md5 from tsk_files where (known != 1 OR known IS NULL) and data_source_obj_id=%s) GROUP BY md5 HAVING COUNT(*) > 1) order by md5";
|
||||
private final Long selectedDataSourceId;
|
||||
|
||||
public SingleDataSource(Long dataSourceId, Map<Long, String> dataSourceIdMap) {
|
||||
@@ -36,7 +36,7 @@ class SingleDataSource extends CommonFilesMetaDataBuilder {
|
||||
|
||||
@Override
|
||||
protected String buildSqlWhereClause() {
|
||||
Object[] args = new String[]{Long.toString(this.selectedDataSourceId), Long.toString(this.selectedDataSourceId)};
|
||||
Object[] args = new String[]{Long.toString(this.selectedDataSourceId)};
|
||||
return String.format(SingleDataSource.WHERE_CLAUSE, args);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user