2.1 RC2 Upgrade loops forerver if IPs with leading spaces in the members table

Started by PhilGer, June 21, 2020, 09:56:19 AM

Previous topic - Next topic

PhilGer

Problem: Upgrade script loops forerver when there are IP addresses with leading spaces in the members table.

Source: upgrade_2-1_mysql.sql
Step:
/******************************************************************************/
--- Update members ip with ipv6 support
/******************************************************************************/
[...]
---# Convert member ips
---{
MySQLConvertOldIp('members','member_ip_old','member_ip');
---}
---#



Workraound (while the upgrade hangs in the loop):
UPDATE `smf_members` SET member_ip_old  = trim(member_ip_old)
WHERE  Member_ip IS NULL

I let you be the judge whether this is a bug or not.
Of course, the real root cause is in the code that writes the leading spaces to the database. Nevertheless, this is something the upgrade script should be able to handle.
We had this issue with > 600 (~0.5%) members.

Arantor

Again, did you try this with the code on GitHub (that's about a year newer)?

PhilGer

Quote from: Arantor on June 21, 2020, 11:32:24 AM
Again, did you try this with the code on GitHub (that's about a year newer)?
It was the Update from the download page.

I cannot find any issue matching this on GitHub.
The current code on GitHUb looks to me as it would still have this problem.

Arantor

Just because things don't have issues doesn't mean they weren't fixed.

In this case there's been over a year's worth of changes, and as this has been discussed at least once that I've seen, it is possible it had been fixed.

Advertisement: