Introduced in this upstream commit https://github.com/mysql/mysql-server/commit/6fbedeb605c0225c72b3ca4c48365c6376f2a2a6
Consider the following SQL :
The TokuDB engine has the option (enabled by default) to store its index files within the mysql database directory of the database where the table was created. In 5.7, when the DROP DATABASE logic within sql/sql_db.cc:find_unknown_and_remove_deletable_files function found extra files that it did not know how to handle, it fell back to enumerating the tables within the database and performing 'friendly' or formal deletion of each table within the database. The commit noted above for 8.0 breaks/changes this and now the server simply spits an error to the client.