engineMixupCheck Error When Upgrading from Aurora MySQL 5.7 to 8.0

0

I tried to upgrade from Aurora MySQL 5.7 (2.10.2) to Aurora MySQL 8.0 (3.02.2) and I got this pre-check error in the logs.

{
            "id": "engineMixupCheck",
            "title": "Tables recognized by InnoDB that belong to a different engine",
            "status": "OK",
            "description": "Error: Following tables are recognized by InnoDB engine while the SQL layer believes they belong to a different engine. Such situation may happen when one removes InnoDB table files manually from the disk and creates e.g. a MyISAM table with the same name.\n\nA possible way to solve this situation is to e.g. in case of MyISAM table:\n\n1. Rename the MyISAM table to a temporary name (RENAME TABLE).\n2. Create some dummy InnoDB table (its definition does not need to match), then copy (copy, not move) and rename the dummy .frm and .ibd files to the orphan name using OS file commands.\n3. The orphan table can be then dropped (DROP TABLE), as well as the dummy table.\n4. Finally the MyISAM table can be renamed back to its original name.",
            "detectedProblems": [
                {
                    "level": "Error",
                    "dbObject": "mysql.general_log_backup",
                    "description": "recognized by the InnoDB engine but belongs to CSV"
                }
            ]
        },

Looking at the MySQL shell code and running that SQL, I get this result.

SELECT a.table_schema,
       a.table_name,
       concat('recognized by the InnoDB engine but belongs to')
FROM information_schema.tables a
JOIN
  (SELECT substring_index(NAME, '/', 1) AS table_schema,
          substring_index(substring_index(NAME, '/', -1), '#', 1) AS TABLE_NAME
   FROM information_schema.innodb_sys_tables
   WHERE NAME like '%/%') b ON a.table_schema = b.table_schema
AND a.table_name = b.table_name
WHERE a.engine != 'Innodb'

+--------------+--------------------+----------------------------------------------------------+
| table_schema | table_name         | concat('recognized by the InnoDB engine but belongs to') |
+--------------+--------------------+----------------------------------------------------------+
| mysql        | general_log_backup | recognized by the InnoDB engine but belongs to           |
+--------------+--------------------+----------------------------------------------------------+
1 row in set (0.11 sec)

And it is because this entry is present in the information_schema.innodb_sys_tables which should not really be present in the first place.

mysql> select * from information_schema.innodb_sys_tables where NAME like '%general%';
+----------+--------------------------+------+--------+-------+-------------+------------+---------------+------------+
| TABLE_ID | NAME                     | FLAG | N_COLS | SPACE | FILE_FORMAT | ROW_FORMAT | ZIP_PAGE_SIZE | SPACE_TYPE |
+----------+--------------------------+------+--------+-------+-------------+------------+---------------+------------+
|    16462 | mysql/general_log_backup |   33 |      9 | 16448 | Barracuda   | Dynamic    |             0 | Single     |
+----------+--------------------------+------+--------+-------+-------------+------------+---------------+------------+
1 row in set (0.09 sec)

Coincidentally, according to the release notes of Aurora 3.02.0, it says this:

Fixed an issue that can cause upgrade failures from Aurora MySQL 2 to Aurora MySQL 3 due to schema inconsistency errors reported by upgrade prechecks for the general log and slow log tables.

While it says "schema inconsistency errors" and my error is "engineMixupCheck", it feels like both errors are somewhat related to each other since it involves the general_log.

Also, when I look at this, it mentions about

mysql.general_log_backup recognized by the InnoDB engine but belongs to CSV.

which is exactly the error that I am getting but it does not seem a solution has been provided.

So, has anyone seen this error and is there a workaround for this?

No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions