When a table is renamed to an internal #sql2 or #sql-ib name during a table-rebuilding DDL operation such as OPTIMIZE TABLE or ALTER TABLE, and shortly after that a purge operation in an index on virtual columns is attempted, the operation could fail, but purge would fail to release the table reference:
This bug was found during the development of a backup-friendly TRUNCATE (RENAME, CREATE, DROP) in
MDEV-13564. It would occasionally cause the TRUNCATE TABLE statement to hang during the DROP part in the test gcol.innodb_virtual_purge_debug.
A similar hang should be possible in a table-rebuilding ALTER TABLE of a table that had indexed virtual columns before the operation.