All Products
Search
Document Center

ApsaraDB RDS:Check report details of a major engine version upgrade

Last Updated:Sep 09, 2024

This topic describes the common errors that are included in the report for the major engine version upgrade of an ApsaraDB RDS for MySQL instance. This topic also describes the check items, check content, possible causes of errors, and solutions.

The following table describes the common errors. If you encounter errors that are not described in the table, submit a ticket.

Check item

Common error

Check content

Possible cause

Solution

check_ins_major_version

Current engine version does not support operations.

Check whether the version of the current RDS instance is supported for a major engine version upgrade.

The RDS instance does not run MySQL 5.6 or MySQL 5.7. In addition, the RDS instance is not upgraded from MySQL 5.6 to MySQL 5.7 or MySQL 5.7 to MySQL 8.0.

Make sure that the RDS instance meets the conditions for a major engine version upgrade. For more information, see Upgrade the major engine version.

check_ins

Specified instance does not exist or not support.

Check whether the current RDS instance exists.

The RDS instance does not exist or is deleted.

Make sure that the RDS instance that you want to upgrade exists and perform an upgrade check on the existing RDS instance.

check_ins_status

Current DB instance state does not support this operation.

Check whether the current RDS instance is in the Running state.

The RDS instance is not in the Running state because operations such as instance restart and network connection establishment are being performed on the RDS instance.

Wait until the operations on the RDS instance are complete and the status of the RDS instance changes to Running. Then, perform the upgrade check on the RDS instance again.

check_master_ins

Current DB instance type does not support this operation.

Check whether the RDS instance that you want to upgrade is a primary RDS instance.

The RDS instance that you want to upgrade is a disaster recovery RDS instance or a read-only RDS instance.

Make sure that the RDS instance that you want to upgrade is a primary RDS instance.

check_ins_locked_state

Current DB instance lock mode does not support this operation.

Check whether the RDS instance is locked.

The RDS instance is in the Locking state.

Unlock the RDS instance and wait until the status of the RDS instance changes to Running. Then, perform the upgrade check on the RDS instance again. For more information, see What do I do if my ApsaraDB RDS instance is in the Locking state?

check_maxscale_kernel

The Maxscale version used by the instance is too low, please upgrade the Maxscale version first.

Check whether the database proxy version of the RDS instance for which the database proxy feature is enabled is supported for a major engine version upgrade.

The database proxy version of the RDS instance for which the database proxy feature is enabled is earlier than 1.13.41.

Upgrade the database proxy version of the RDS instance for which the database proxy is enabled to the required version before you upgrade the major engine version of the RDS instance. For more information, see Upgrade the database proxy version.

check_ins_tde_state

Specified TDEStatus is not configured on the This custins.

Check whether the Transparent Data Encryption (TDE) feature is enabled for the current RDS instance.

The TDE feature is enabled for the current RDS instance.

If the TDE feature is enabled for an RDS instance, you cannot directly upgrade the major engine version of the RDS instance in the ApsaraDB RDS console. For more information, see Upgrade the database engine version.

check_target_ins_level

Current DB instance level does not support this operation.

Current DB instance level does not support this operation.

The instance type of the current RDS instance is phased out.

If the RDS instance uses a phased-out instance type, you must upgrade the instance type of the RDS instance before you can upgrade the major engine version of the RDS instance.

check_target_read_level

The read-only instance level is not supported in the target instance.

Check whether the instance type of the current read-only RDS instance is available for purchase.

The instance type of the current read-only RDS instance is phased out.

If the current read-only RDS instance uses local disks, change the instance type of the read-only RDS instance to an available instance type. Then, perform the upgrade check on the RDS instance again.

check_upgrade_check_task

The task already exists.

Check whether an upgrade check is being performed on the current RDS instance.

An upgrade check is being performed on the current RDS instance.

Wait until the upgrade check is complete. After the status of the RDS instance changes to Running, perform the upgrade check again.

check_upgrade_task

The task already exists.

Check whether a major engine version upgrade is performed on the current RDS instance.

The major engine version of the current RDS instance is being upgraded.

Wait until the major engine version of the current RDS instance is upgraded. After the status of the RDS instance changes to Running, perform the upgrade check again.

check_storage _type

Cloud ssd does not support this operation, please upgrade to essd.

Check whether the current RDS instance uses standard SSDs.

The current RDS instance uses standard SSDs.

Upgrade the storage type of the current RDS instance from standard SSDs to Enterprise SSDs (ESSDs). For more information, see Upgrade the storage type from standard SSDs to ESSDs.

check_source_category

Specified source category is invalid.

Check the RDS edition of the current RDS instance.

The current RDS instance does not run RDS Basic Edition or RDS High-availability Edition.

Make sure that the RDS instance that you want to upgrade runs RDS Basic Edition or RDS High-availability Edition.

check_ins_biz_type

Specified biz type is not valid.

Check whether the current RDS instance is deployed on Alibaba Cloud public cloud.

The current RDS instance is not deployed on Alibaba Cloud public cloud.

Make sure that the RDS is deployed on Alibaba Cloud public cloud.

check_ins_tables_number

Upgrade not allowed due to excessive number of tables: more than 200,000.

Upgrade not allowed due to excessive number of tables: more than 50,000.

Check the number of data tables on the RDS instance.

  • If the RDS instance uses local disks and the number of data tables on the RDS instance exceeds 200,000, you cannot upgrade the major engine version of the RDS instance.

  • If the RDS instance uses cloud disks and the number of data tables on the RDS instance exceeds 300,000, you cannot upgrade the major engine version of the RDS instance.

Delete redundant data tables and perform the upgrade check again.

check_ins_db_engine

There are engines present such as MyISAM, Memory, TokuDB, Sphinx, or RocksDB.

Check whether the RDS instance runs the MyISAM, MEMORY, TokuDB, Sphinx, or RocksDB storage engine.

The RDS instance runs the MyISAM, MEMORY, TokuDB, Sphinx, or RocksDB storage engine. In this case, you cannot upgrade the major engine version of the RDS instance.

Change the storage engine of the RDS instance to InnoDB. If the storage engine of the RDS instance is InnoDB but some tables on the RDS instance still run other storage engines, execute the ALTER TABLE <Table name> engine=InnoDB; statement to change the storage engines of the tables to InnoDB before you upgrade the major engine version of the RDS instance.

check_ins_fts

The current instance has an FTS index, and the minor version is less than 20221130.

Check whether a full-text search (FTS) index exists on the RDS instance and whether the minor engine version of the RDS instance is earlier than 20221130.

  • Due to historical reasons of MySQL, FTS indexes may be created in the system tablespace of RDS instances. In this case, if you upgrade the major engine versions of the RDS instances, the system tablespace of the RDS instances may be damaged by the FTS indexes. To prevent data corruption, you must delete the FTS indexes before you upgrade the major engine versions of the RDS instances.

  • The preceding issues are fixed for RDS instances that run MySQL 5.6 and a minor engine version of 20221130, and the FTS indexes are created in a separate tablespace for the RDS instances.

FTS indexes are created in the system tablespace for RDS instances that run MySQL 5.6. Therefore, when you upgrade the major engine version of your RDS instance from MySQL 5.6 to MySQL 5.7, you must delete the FTS indexes in the system tablespace and make sure that the minor engine version of the RDS instance that runs MySQL 5.6 is 20221130 or later. If your RDS instance runs MySQL 5.6 or earlier, you must upgrade the major engine version to MySQL 5.6. For more information, see Upgrade the major engine version.

  1. Delete the FTS index created in the system tablespace based on the table name.

    ALTER TABLE $table_name DROP INDEX $fts_name;
  2. Recreate the FTS index.

    ALTER TABLE $table_name ADD FULLTEXT INDEX $fts_name;
  3. Execute the following SQL statement to query the FTS index created for your RDS instance. If no query result is returned, the FTS index is not created in the system tablespace and the upgrade of the major engine version from MySQL 5.6 to MySQL 5.7 does not fail due to the FTS index created in the system tablespace.

    SELECT NAME FROM information_schema.INNODB_SYS_TABLES WHERE TABLE_ID IN ( SELECT CONV(SUBSTRING_INDEX(SUBSTRING_INDEX(NAME, '_', -4),'_', 1),16,10) FROM INNODB_SYS_TABLES WHERE NAME LIKE '%fts_00000000%' AND SPACE = 0);

check_read_ins_number

The number of read-only instances cannot be greater than 8.

Check whether the number of read-only RDS instances that use local disks is greater than 8.

The number of read-only RDS instances that use local disks is greater than 8.

Reduce the number of read-only RDS instances that use local disks to less than or equal to 8 and perform the upgrade. After the upgrade is complete, create read-only RDS instances based on your business requirements.

check_slave_state

The slave status is unhealthy or has delays.

Check the status of the secondary node and the latency information.

The status of the secondary node may be abnormal, or data may be inconsistent between the primary and secondary nodes due to replication latency.

Check the Node Replication Thread Status and Node Replication Latency(second) metrics on the Monitoring and Alerts page in the ApsaraDB RDS console. If the secondary node runs as normal, perform the upgrade check.

check_account

The instance has an aliyun_root account.

Check the account.

The aliyun_root account is manually created for RDS instances that run MySQL 5.6.

Delete or modify the duplicate aliyun_root account before you perform the upgrade check. The aliyun_root account is automatically created for RDS instances that run MySQL 5.7 or later. If you created the aliyun_root account for RDS instances that run MySQL 5.6, an error message indicating the duplicate account name exists is displayed when you upgrade the major engine version from MySQL 5.6 to MySQL 5.7. In this case, you must delete or modify the aliyun_root account before you perform the upgrade check. For more information, see System accounts.

check_sys_schema

The instance already has a sys database.

Check whether the sys database exists on the RDS instance.

The sys database is automatically created for RDS instances that run MySQL 5.7. If you created the sys database for RDS instances that run MySQL 5.6, the major engine version of the RDS instance cannot be upgraded from MySQL 5.6 to MySQL 5.7.

Rename the duplicate sys database. MySQL does not support the RENAME DATABASE statement, and you must execute the ALTER TABLE RENAME statement to rename the database.

SELECT * FROM information_schema.SCHEMATA WHERE SCHEMA_NAME='sys';

check_table_discard

There are tables that have been discarded.

Check whether discarded tables exist on the RDS instance. Discarded tables refer to the tables on which the ALTER TABLE discard TABLESPACE statement is executed.

Discarded tables exist on the RDS instance.

Query and delete the discarded tables.

SELECT space,name FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES WHERE FS_BLOCK_SIZE=0 AND FILE_SIZE=0 AND name NOT LIKE '%#sql%';

check_table_foreign_key

The partitioned table contains foreign keys.

Check whether the partition table of the RDS instance contains foreign keys.

The partition table of the RDS instance contains foreign keys or is referenced by foreign keys of other tables.

Resolve the conflicts between foreign keys in a table and the partition table.

  1. Query the partition tables that contain foreign keys.

    SELECT DISTINCT a.TABLE_SCHEMA, a.TABLE_NAME
    FROM information_schema.TABLE_CONSTRAINTS a, information_schema.PARTITIONS b
    WHERE a.CONSTRAINT_TYPE='FOREIGN KEY'
    AND a.TABLE_SCHEMA = b.TABLE_SCHEMA
    AND a.TABLE_NAME = b.TABLE_NAME
    AND (b.PARTITION_NAME IS NOT NULL OR b.SUBPARTITION_NAME IS NOT NULL);
  2. Query the partition tables that are referenced by foreign keys in other tables.

    SELECT DISTINCT a.TABLE_SCHEMA, a.TABLE_NAME, a.REFERENCED_TABLE_SCHEMA, a.REFERENCED_TABLE_NAME
    FROM information_schema.KEY_COLUMN_USAGE a, information_schema.PARTITIONS b
    WHERE a.REFERENCED_TABLE_SCHEMA = b.TABLE_SCHEMA
    AND a.REFERENCED_TABLE_NAME = b.TABLE_NAME
    AND (b.PARTITION_NAME IS NOT NULL OR b.SUBPARTITION_NAME IS NOT NULL);

check_column_length

The number of views with column length greater than or equal to 64 is greater than 0.

Check the number of views whose column length is greater than or equal to 64.

The number of views whose column length is greater than or equal to 64 exceeds 0.

Query the views whose column length is greater than or equal to 64. Then, modify the column length of the views or delete the views that are not required.

SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME IN (SELECT TABLE_NAME FROM INFORMATION_SCHEMA.VIEWS) AND CHAR_LENGTH(COLUMN_NAME) >= 64;

check_foreign_key_constraint

The number of tables with foreign key constraint length greater than 64 is greater than 0.

Check the number of tables whose foreign key constraints have a name of more than 64 characters in length.

The number of tables whose foreign key constraints have a name of more than 64 characters in length is greater than 0.

Query the related tables. Then, change the names of the foreign key constraints for the tables or delete the tables.

SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME IN (SELECT LEFT(SUBSTR(ID,INSTR(ID,'/')+1),INSTR(SUBSTR(ID,INSTR(ID,'/')+1),'_ibfk_')-1) FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN WHERE CHAR_LENGTH(SUBSTR(ID,INSTR(ID,'/')+1))>64);

check_dictionary_table

The tables in the system database of the RDS instance that runs MySQL 5.7 cannot have the same names as the tables used by the data dictionary in MySQL 8.0.

Check whether the tables in the system database of the RDS instance that runs MySQL 5.7 have the same names as the tables used by the data dictionary in MySQL 8.0.

The tables in the system database of the RDS instance that runs MySQL 5.7 have the same names as the tables used by the data dictionary in MySQL 8.0.

Check whether the tables in the system database of the RDS instance that runs MySQL 5.7 have the same names as the tables used by the data dictionary in MySQL 8.0. If the tables that have duplicate names exist, delete or rename the tables.

SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE LOWER(
TABLE_SCHEMA) = 'mysql' and LOWER(TABLE_NAME) IN
('catalogs', 'character_sets', 'check_constraints', 'collations',
'column_statistics', 'column_type_elements', 'columns',
'dd_properties', 'events', 'foreign_key_column_usage', 'foreign_keys',
'index_column_usage', 'index_partitions', 'index_stats',
'indexes', 'parameter_type_elements', 'parameters', 'resource_groups', 'routines',
'schemata', 'st_spatial_reference_systems',
'table_partition_values', 'table_partitions', 'table_stats', 'tables',
'tablespace_files', 'tablespaces', 'triggers', 'view_routine_usage',
'view_table_usage');

check_ins_health

The master node of the instance is not available.

Check whether the RDS instance is available or check the connectivity of the RDS instance.

The CPU utilization reaches 100%, and the disk space is exhausted.

You can check the required metrics on the Monitoring and Alerts page in the ApsaraDB RDS console. For more information, see Monitoring and alerts.

check_read_ins_exists

Instances with read-only do not support this operation.

Check whether the RDS instance that runs MySQL 5.7 and uses cloud disks has read-only RDS instances.

The RDS instance that runs MySQL 5.7 and uses cloud disks has read-only RDS instances. Upgrade operations are not supported for RDS instances that have read-only RDS instances and use cloud disks.

Release the read-only RDS instances. After the upgrade is complete, you can create read-only RDS instances based on your business requirements.

check_table_index_type

MySQL 8.0 does not support creating BTREE indexes on spatial fields.

Check whether the RDS instance that runs MySQL 5.7 contains BTREE indexes on spatial data types before you upgrade the major engine version of the RDS instance from MySQL 5.7 to MySQL 8.0.

RDS instances that run MySQL 8.0 do not support creating BTREE indexes on spatial data types.

To delete or modify an unsupported index, execute the following statement:

SELECT DISTINCT s.* FROM INFORMATION_SCHEMA.STATISTICS s
INNER JOIN INFORMATION_SCHEMA.COLUMNS c
ON s.TABLE_SCHEMA = c.TABLE_SCHEMA
AND s.TABLE_NAME = c.TABLE_NAME
AND s.COLUMN_NAME = c.COLUMN_NAME
WHERE s.TABLE_SCHEMA NOT IN ('mysql', 'sys')
AND c.DATA_TYPE IN ('GEOMETRY', 'POINT', 'LINESTRING', 'POLYGON', 'MULTIPOINT', 
'MULTILINESTRING', 'MULTIPOLYGON', 'GEOMETRYCOLLECTION')
AND s.INDEX_TYPE = 'BTREE';