Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update List.pm #1053

Merged
merged 1 commit into from
Jan 30, 2021
Merged

Update List.pm #1053

merged 1 commit into from
Jan 30, 2021

Conversation

faust64
Copy link
Contributor

@faust64 faust64 commented Dec 8, 2020

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.

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.
@ikedas
Copy link
Member

ikedas commented Dec 8, 2020

Hi @faust64 , could you please tell us from what version to what version you tried upgrading?

@faust64
Copy link
Contributor Author

faust64 commented Dec 8, 2020

from 5.4.7 to 6.2.40

@ikedas
Copy link
Member

ikedas commented Dec 8, 2020

Sorry, I overlooked your first comment.
I guess this bug was found out due to upgrade of MySQL server (see also #1028). This bug may also affect to the other DBMSs. Thank you for reporting and fixing bug!

@ikedas ikedas added this to the 6.2.62 milestone Dec 9, 2020
@ikedas
Copy link
Member

ikedas commented Dec 9, 2020

BTW I have one thing to point out about your fix.

As the result of Sympa::Tools::Text::foldcase() can be a multibyte string (for example, the word "humanité" consists of 9 bytes, though it consists of 8 letters), substr() might break character boundary. With MySQL, partial byte sequence is simply ignored, but the other DBMSs do not always do such.

It turned out not easy to solve this problem. I'll commit your PR after the next stable and then add additional fix.

@ikedas ikedas merged commit 13af5d0 into sympa-community:sympa-6.2 Jan 30, 2021
@faust64 faust64 deleted the patch-1 branch January 30, 2021 11:00
ikedas added a commit to ikedas/sympa that referenced this pull request Jan 30, 2021
ikedas added a commit that referenced this pull request Feb 2, 2021
@ikedas ikedas added the bug label Feb 2, 2021
@ikedas
Copy link
Member

ikedas commented Feb 2, 2021

Additional fix has been merged. @faust64 , thank you for reporting and fixing the bug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants