summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Mysql.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index 601be102b..92263af9d 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -108,7 +108,9 @@ sub new {
my $min_max_allowed_packet = MAX_COMMENTS * MAX_COMMENT_LENGTH;
my $max_allowed_packet = max($min_max_allowed_packet,
$current_max_allowed,
- Bugzilla->params->{'maxattachmentsize'});
+ # This parameter is not yet defined when the DB
+ # is being built for the very first time.
+ Bugzilla->params->{'maxattachmentsize'} || 0);
$self->do("SET SESSION max_allowed_packet = $max_allowed_packet");
return $self;