From 739af93e9c7ceb64caec08cfbdc77df9e5f5625c Mon Sep 17 00:00:00 2001 From: Samuel Date: Tue, 8 Dec 2020 11:35:31 +0100 Subject: [PATCH] Update List.pm Upgrade process may fail inserting records in the `list_table` table, due to the `searchkey_list` value overflowing that column size (`varchar(255)`). Truncates that field, to ensure upgrade doesn't skip anything. Wild guess / maybe there's other places we could do this. Found out a mention of that issue over there: https://listes.renater.fr/sympa/arc/sympa-fr/2019-10/msg00017.html As of patching that file on my server, I can re-run the upgrade (from 5.4.7 to 6.2.40), without any mention of such failures. --- src/lib/Sympa/List.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Sympa/List.pm b/src/lib/Sympa/List.pm index ba2aca094..6bace3f36 100644 --- a/src/lib/Sympa/List.pm +++ b/src/lib/Sympa/List.pm @@ -6037,7 +6037,7 @@ sub _update_list_db { my $name = $self->{'name'}; my $searchkey = - Sympa::Tools::Text::foldcase($self->{'admin'}{'subject'} || ''); + substr( Sympa::Tools::Text::foldcase($self->{'admin'}{'subject'} || ''), 0, 255); my $status = $self->{'admin'}{'status'}; my $robot = $self->{'domain'};