aboutsummaryrefslogtreecommitdiffstats
path: root/lib/LXRng/Index/DBI.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/LXRng/Index/DBI.pm')
-rw-r--r--lib/LXRng/Index/DBI.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/LXRng/Index/DBI.pm b/lib/LXRng/Index/DBI.pm
index f22ebab..667530d 100644
--- a/lib/LXRng/Index/DBI.pm
+++ b/lib/LXRng/Index/DBI.pm
@@ -278,14 +278,23 @@ sub _identifiers_by_name {
my $pre = $self->prefix;
my $sth = $$self{'sth'}{'_identifiers_by_name'} ||=
$dbh->prepare(qq{
- select i.id, i.type, f.path, i.line, i.id_rfile
+ (select i.id, i.type, f.path, i.line, i.id_rfile
from ${pre}identifiers i, ${pre}files f,
${pre}filereleases r, ${pre}revisions v
where i.id_rfile = v.id and v.id = r.id_rfile
and r.id_release = ? and v.id_file = f.id
- and i.id_symbol = ? limit 500});
+ and i.type != 'm' and i.type != 'l'
+ and i.id_symbol = ? limit 250)
+ union
+ (select i.id, i.type, f.path, i.line, i.id_rfile
+ from ${pre}identifiers i, ${pre}files f,
+ ${pre}filereleases r, ${pre}revisions v
+ where i.id_rfile = v.id and v.id = r.id_rfile
+ and r.id_release = ? and v.id_file = f.id
+ and (i.type = 'm' or i.type = 'l')
+ and i.id_symbol = ? limit 250)});
- $sth->execute($rel_id, $sym_id);
+ $sth->execute($rel_id, $sym_id, $rel_id, $sym_id);
my $res = $sth->fetchall_arrayref();
return $res;