When something goes wrong during IMPORT TABLESPACE, the table can be dropped, but n
Problem is that the tablespace was still detached after the failed ALTER, as the new tablespace file did not match, and the old was already gone.
After removing the t2.ibd file manually CREATE works again.
But I think it would be better if either:
- even on failed import the table "remembers" the failed import attempt, and keeps the .ibd file somewhat linked to the table so that it gets removed on drop (or just brute force delete .ibd file always)
- let the DROP fail with an appropriate error message if table is in DISCARD stage and an .ibd file by its name is still visible