From: Claudio Sacerdoti Coen Date: Fri, 24 Jun 2005 10:08:44 +0000 (+0000) Subject: Bug fixed: select => select distinct (since the ors in the where patterns X-Git-Tag: INDEXING_NO_PROOFS~76 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=f4c451d39cb4b98e76a291f021c408b3340d2b91;p=helm.git Bug fixed: select => select distinct (since the ors in the where patterns used to generate duplicates). --- diff --git a/helm/ocaml/metadata/metadataConstraints.ml b/helm/ocaml/metadata/metadataConstraints.ml index 602ee49b9..74b15015c 100644 --- a/helm/ocaml/metadata/metadataConstraints.ml +++ b/helm/ocaml/metadata/metadataConstraints.ml @@ -156,10 +156,10 @@ let exec ~(dbd:Mysql.dbd) ?rating (n,from,where) = let where = String.concat " and " where in let query = match rating with - | None -> sprintf "select table0.source from %s where %s" from where + | None -> sprintf "select distinct table0.source from %s where %s" from where | Some `Hits -> sprintf - ("select table0.source from %s, hits where %s + ("select distinct table0.source from %s, hits where %s and table0.source = hits.source order by hits.no desc") from where in