Bug #99211 Inplace upgrade 5.7 -> 8.0. fails with "Error in fixing SE data" specific case
Submitted: 8 Apr 2020 23:58 Modified: 20 Jul 2020 8:39
Reporter: egezon berisha Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Data Dictionary Severity:S2 (Serious)
Version:8.0.19 OS:Debian (Buster)
Assigned to: CPU Architecture:Any

[8 Apr 2020 23:58] egezon berisha
Description:
In-place upgrade fails from MySQL 5.7.29 to MySQL 8.0.19 if a table contain a FULLTEXT index and belongs to general tablespace.
If the table doesn't belong to a general tablespace or the table doesn't contain a FULLTEXT index then the in-place upgrade works just fine.

How to repeat:

In MySQL5.7
1. Create a general tablespace
2. create a table with FULLTEXT index that belongs to that tablespace
3. See the in-place upgrade fails.

Example:

mysql> create database db_upgrade_test;
Query OK, 1 row affected (0.00 sec)
mysql> use db_upgrade_test;
Database changed
mysql> CREATE TABLESPACE `ts1` ADD DATAFILE 'ts1.ibd' Engine=InnoDB;
Query OK, 0 rows affected (0.02 sec)
mysql> CREATE TABLE t1 ( c2 text,
    ->   FULLTEXT idx (c2)
    -> ) TABLESPACE ts1;
Query OK, 0 rows affected (0.03 sec)
mysql> exit

You should see this error in the mysql log file

 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for db_upgrade_test.t1
 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.
 0 [ERROR] [MY-010119] [Server] Aborting

Suggested fix:
N/A
[9 Apr 2020 9:23] MySQL Verification Team
Hello egezon berisha,

Thank you for the report and feedback.

regards,
Umesh
[9 Apr 2020 9:25] MySQL Verification Team
Upgrade test results - 5.7.29 -> 8.0.19

Attachment: 99211.results (application/octet-stream, text), 12.26 KiB.

[13 Apr 2020 16:03] egezon berisha
Hi Umesh,

Thank you for verifying the bug. Do you have any ETA for this issue? As this is blocking for us to go ahead with upgrade to MySQL8.0.

Thank you,
-Egezon Berisha
[16 Apr 2020 14:58] Pepe Rodriguez
Posted by developer:

While dev works in the fix, there is a workaround to bypass this upgrade
issue. In the example provided above, the workaround would be like the
following:

Before upgrade:

create database db_upgrade_test;
use db_upgrade_test;
CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd' Engine=InnoDB;
CREATE TABLE t1 ( c2 text, FULLTEXT idx (c2)) TABLESPACE ts1;
ALTER TABLE t1 DROP INDEX idx;

After Upgrade:

use db_upgrade_test;
ALTER TABLE t1 ADD FULLTEXT idx (c2);
[21 Apr 2020 17:21] egezon berisha
Thank you for the suggestion. We'll wait for the fix though as we have a lot of tables that contain the FULLTEXT index and belong to a table space. Is there any ETA for this?
[20 Jul 2020 8:39] Erlend Dahl
[15 Jul 2020 12:43] Daniel T Price

Fixed as of the upcoming 8.0.22 release, and here's the proposed changelog
entry from the documentation team:
 
Upgrade from MySQL 5.7 to MySQL 8.0 failed on an instance with a table
created in a general tablespace and defined with a FULLTEXT index. The
correct data dictionary space ID for table could not determined.