Basic Information
I've been helping a forum member with a very large & problematic upgrade, 3.3M+ posts. This is one of the issues faced. This is a 2.0 => 2.1 upgrade. Forum is MariaDB, MyISAM, latin1.
The upgrade crashes repeatedly at the json conversion step, before the utf8 conversion. The fatal error is caused by this query:

Note that it is trying to decrement the value of the 'memberlist_cache' setting via updateSettings. The DB query is failing because it's a serialized string, not a numeric value... Why did it do that? The json_encode of the unserialized string comes back false. The call to updateSettings with a new value of false tells upgradeSettings to set the string to 'value - 1', which fails.
EDIT: After further tests & diagnosing the issue, I don't think this has anything to do with MariaDB vs MySQL, nor CLI vs browser. It has nothing to do with how things are escaped.
The root, I believe, is more basic than that... json_encode ONLY works on utf8... And we're not on utf8 yet, at this stage of the upgrade... When you try to json_encode a string with a singe-byte, latin1 umlaut in it, it fails & returns false.
Steps to reproduce
Expected result
No response
Actual result
No response
Version/Git revision
2.1.7 & 3.0 Alpha 4
Database Engine
All
Database Version
MySQL 8.4.4 & MariaDB 11.5.2
PHP Version
8.4.5
Logs
Additional Information
This is followup to the forum threads regarding failed upgrades & restores:
https://www.simplemachines.org/community/index.php?topic=594485.0
https://www.simplemachines.org/community/index.php?topic=594487.0
Basic Information
I've been helping a forum member with a very large & problematic upgrade, 3.3M+ posts. This is one of the issues faced. This is a 2.0 => 2.1 upgrade. Forum is MariaDB, MyISAM, latin1.
The upgrade crashes repeatedly at the json conversion step, before the utf8 conversion. The fatal error is caused by this query:

Note that it is trying to decrement the value of the 'memberlist_cache' setting via updateSettings. The DB query is failing because it's a serialized string, not a numeric value... Why did it do that? The json_encode of the unserialized string comes back false. The call to updateSettings with a new value of false tells upgradeSettings to set the string to 'value - 1', which fails.
EDIT: After further tests & diagnosing the issue, I don't think this has anything to do with MariaDB vs MySQL, nor CLI vs browser. It has nothing to do with how things are escaped.
The root, I believe, is more basic than that... json_encode ONLY works on utf8... And we're not on utf8 yet, at this stage of the upgrade... When you try to json_encode a string with a singe-byte, latin1 umlaut in it, it fails & returns false.
Steps to reproduce
Expected result
No response
Actual result
No response
Version/Git revision
2.1.7 & 3.0 Alpha 4
Database Engine
All
Database Version
MySQL 8.4.4 & MariaDB 11.5.2
PHP Version
8.4.5
Logs
Additional Information
This is followup to the forum threads regarding failed upgrades & restores:
https://www.simplemachines.org/community/index.php?topic=594485.0
https://www.simplemachines.org/community/index.php?topic=594487.0