]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix bustage on Oracle due to bug 898830
authorFrédéric Buclin <LpSolit@gmail.com>
Mon, 2 Sep 2013 00:35:18 +0000 (02:35 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Mon, 2 Sep 2013 00:35:18 +0000 (02:35 +0200)
Bugzilla/Attachment.pm

index 7e758c87454a6d66b137ffec7d2d10d4f28de787..251363c35c9b396f622d68ba3c25232c401033ff 100644 (file)
@@ -684,13 +684,13 @@ sub get_attachments_by_bug {
 
         # Preload datasizes.
         my $sizes =
-          $dbh->selectall_hashref('SELECT attach_id, LENGTH(thedata) AS size
+          $dbh->selectall_hashref('SELECT attach_id, LENGTH(thedata) AS datasize
                                    FROM attachments LEFT JOIN attach_data ON attach_id = id
                                    WHERE bug_id = ?',
                                    'attach_id', undef, $bug->id);
 
         # Force the size of attachments not in the DB to be recalculated.
-        $_->{datasize} = $sizes->{$_->id}->{size} || undef foreach @$attachments;
+        $_->{datasize} = $sizes->{$_->id}->{datasize} || undef foreach @$attachments;
     }
     return $attachments;
 }