Bug #91325 upgrade fail: Assertion failure: dict0dict.cc:1272:table->referenced_set.empty()
Submitted: 20 Jun 2018 10:11 Modified: 20 Aug 2018 13:30
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:8.0.11 OS:Any
Assigned to: CPU Architecture:Any

[20 Jun 2018 10:11] Shane Bester
Affects debug/release builds.
In-place upgrade from 5.7 to 8.0.11 may fail like this on the first startup:

[ERROR] [MY-013183] [InnoDB] InnoDB: Assertion failure: dict0dict.cc:1272:table->referenced_set.empty() thread 6464

mysqld-debug.exe!std::_Binder<std::_Unforced,void (__cdecl*)

How to repeat:
1. startup 5.7.22 with: mysqld --no-defaults
2. import the test schema:  mysql -uroot --force < t.sql
3. shutdown 5.7.22:  mysqladmin -uroot shutdown
4. startup 8.0.11 and point to the datadir of 5.7.
5. check for crash. it could take 10+ mins as datadir is upgraded slowly..

In a nutshell, just create a whole lot of random tables, and a lot of FK's, and then upgrade the server.
[20 Jun 2018 10:46] Shane Bester
Also see:
[InnoDB] InnoDB: Assertion failure: dict0dict.cc:1271:table->foreign_set.empty() thread 9808
[20 Jun 2018 11:44] Shane Bester
repeated on windows + linux ...
[20 Aug 2018 13:30] Daniel Price
Posted by developer:
Fixed as of the upcoming 8.0.13 release, and here's the changelog entry:

The server exited during an in-place upgrade from MySQL 5.7 to MySQL 8.0
due to an attempted eviction of a foreign-key-related table from the
cache. At the end of the upgrade, tables with FULLTEXT indexes were marked
as ready for eviction without checking for foreign key relationships.