summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Attachment.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2008-01-18 22:56:53 +0100
committermkanat%bugzilla.org <>2008-01-18 22:56:53 +0100
commit793c103590ff0742b6163dca25cfc6250c68f803 (patch)
tree854667752ad8e4377c7bc18c2b40177e7f3083da /Bugzilla/Attachment.pm
parent2c8316b9f30ca3ab96b7e8acd1275253ae3e272f (diff)
downloadbugzilla-793c103590ff0742b6163dca25cfc6250c68f803.tar.gz
bugzilla-793c103590ff0742b6163dca25cfc6250c68f803.tar.xz
Bug 408172: [Oracle] Bug lists longer than 1000 bugs fail
Patch By Xiaoou Wu <xiaoou.wu@oracle.com> r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r--Bugzilla/Attachment.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index f853cff04..dafdf70ad 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -99,13 +99,14 @@ sub _retrieve {
'attachments.isprivate AS isprivate'
);
my $columns = join(", ", @columns);
-
- my $records = Bugzilla->dbh->selectall_arrayref("SELECT $columns
- FROM attachments
- WHERE attach_id IN (" .
- join(",", @$ids) . ")
- ORDER BY attach_id",
- { Slice => {} });
+ my $dbh = Bugzilla->dbh;
+ my $records = $dbh->selectall_arrayref(
+ "SELECT $columns
+ FROM attachments
+ WHERE "
+ . Bugzilla->dbh->sql_in('attach_id', $ids)
+ . " ORDER BY attach_id",
+ { Slice => {} });
return $records;
}