Bug #101890 mysql_upgrade from MySQL-Cluster 7.4.27 to 7.5.20 crashes SQL node
Submitted: 7 Dec 2020 12:10 Modified: 10 Dec 2020 6:45
Reporter: Hendrik Woltersdorf Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:7.5.20 OS:CentOS
Assigned to: MySQL Verification Team CPU Architecture:Any

[7 Dec 2020 12:10] Hendrik Woltersdorf
Description:
When upgrading MySQL-Cluster installations from 7.4.27 to 7.5.20, the first run of mysql_upgrade on the first SQL node crashes the SQL node with "Unexpected rename case detected".
mysql_upgrade tries to REPAIR tables with old temporals.
After a restart mysql_upgrade succeeds.

How to repeat:
upgrade from mySQL-Cluster 7.4.27 to 7.5.20 and run mysql_upgrade on the first SQL node. The database(s) need to contail tables with old temporals.
[7 Dec 2020 12:11] Hendrik Woltersdorf
logs of an affected cluster

Attachment: ndb_error_report_20201207130629.tar.bz2 (application/octet-stream, text), 293.87 KiB.

[7 Dec 2020 12:18] Hendrik Woltersdorf
sql node log

Attachment: dit_l1_cl1.log (application/octet-stream, text), 31.30 KiB.

[8 Dec 2020 20:22] MySQL Verification Team
Hi,

You should always upgrade to latest 7.4 first so 7.4.30 before you upgrade to latest 7.5 so 7.5.20, but in your case this is not the problem. The problem you are experiencing is not related to ndbcluster but mysql 5.6 to 5.7 upgrade and as explained here: https://dev.mysql.com/doc/refman/5.7/en/upgrading-from-previous-series.html 

[quote]
 As of MySQL 5.7.7, CHECK TABLE ... FOR UPGRADE reports a table as needing a rebuild if it contains old temporal columns in pre-5.6.4 format (TIME, DATETIME, and TIMESTAMP columns without support for fractional seconds precision) and the avoid_temporal_upgrade system variable is disabled. This helps mysql_upgrade to detect and upgrade tables containing old temporal columns. If avoid_temporal_upgrade is enabled, FOR UPGRADE ignores the old temporal columns present in the table; consequently, mysql_upgrade does not upgrade them.

As of MySQL 5.7.7, REPAIR TABLE upgrades a table if it contains old temporal columns in pre-5.6.4 format and the avoid_temporal_upgrade system variable is disabled. If avoid_temporal_upgrade is enabled, REPAIR TABLE ignores the old temporal columns present in the table and does not upgrade them.

To check for tables that contain such temporal columns and need a rebuild, disable avoid_temporal_upgrade before executing CHECK TABLE ... FOR UPGRADE.

To upgrade tables that contain such temporal columns, disable avoid_temporal_upgrade before executing REPAIR TABLE or mysql_upgrade. 
[/quote]

in good health,
Bogdan
[10 Dec 2020 6:45] Hendrik Woltersdorf
mysql> show variables like 'avoid%';
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| avoid_temporal_upgrade | OFF   |
+------------------------+-------+
1 row in set (0.01 sec)

I did not enable this variable. That's why mysql_upgrade did upgrade the tables. But the first try of mysql_upgrade crashed the SQL node. That is my problem here.
[10 Dec 2020 9:37] MySQL Verification Team
Hi,

> But the first try of mysql_upgrade crashed the SQL node. That is my problem here.

I cannot reproduce this. Tried few times on the same version you had 7.4.27.

It is advised to manually do check table for upgrade before you do mysql_upgrade but is not required. Why you had a crash is hard to tell as I can't reproduce it but in any way, not much can be done now for that old release.