summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Attachment.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-09-04 16:23:47 +0200
committerDave Lawrence <dlawrence@mozilla.com>2013-09-04 16:23:47 +0200
commit05f4f669786cc08853eff42e92ce91a56e971224 (patch)
treedbfa378c532125c0864f6e346cb69ff8454d7877 /Bugzilla/Attachment.pm
parent37aef45426f4b831bbced64783568f8104b42dcb (diff)
downloadbugzilla-05f4f669786cc08853eff42e92ce91a56e971224.tar.gz
bugzilla-05f4f669786cc08853eff42e92ce91a56e971224.tar.xz
Bug 898830 - Improve loading of show_bug.cgi
- Oracle doesn't like 'size' as column alias. It's a reserved word.
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r--Bugzilla/Attachment.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm
index a544ed614..bf67b62fa 100644
--- a/Bugzilla/Attachment.pm
+++ b/Bugzilla/Attachment.pm
@@ -697,13 +697,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;
}