diff options
Diffstat (limited to 'program/lib/Roundcube/rcube_cache_shared.php')
-rw-r--r-- | program/lib/Roundcube/rcube_cache_shared.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/program/lib/Roundcube/rcube_cache_shared.php b/program/lib/Roundcube/rcube_cache_shared.php index 339a9aa20..3f0f20e41 100644 --- a/program/lib/Roundcube/rcube_cache_shared.php +++ b/program/lib/Roundcube/rcube_cache_shared.php @@ -595,8 +595,10 @@ class rcube_cache_shared $this->max_packet = 2097152; // default/max is 2 MB if ($this->type == 'db') { - $value = $this->db->get_variable('max_allowed_packet', 1048500); - $this->max_packet = min($value, $this->max_packet) - 2000; + if ($value = $this->db->get_variable('max_allowed_packet', $this->max_packet)) { + $this->max_packet = $value; + } + $this->max_packet -= 2000; } else if ($this->type == 'memcache') { $stats = $this->db->getStats(); |