From 793c103590ff0742b6163dca25cfc6250c68f803 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 18 Jan 2008 21:56:53 +0000 Subject: Bug 408172: [Oracle] Bug lists longer than 1000 bugs fail Patch By Xiaoou Wu r=mkanat, a=mkanat --- Bugzilla/Attachment.pm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'Bugzilla/Attachment.pm') 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; } -- cgit v1.2.3-24-g4f1b