During ALTER TABLE MariaDB is creating some temporary #sql- prefixed table to hold the content of the new table. If MariaDB crashes during the ALTER TABLE, the #sql- tables will resist on disk and in the Innodb dictionary.
In 10.3 one can delete #sql- tables with DROP TABLE, but in earlier version of MariaDB this is not possible.
This will be properly fixed in 10.3 or 10.4 when we make ALTER TABLE, DROP TABLE and CREATE TABLE atomic. This will also ensure that .frm tables and the table definition in the storage engine is always up to date.
In the mean time, as part of this task, we will add a purge of #sql- table's during innodb recovery, both from the disk and from the dictionary.
This will stop one from getting errors like this in the error log:
Invalid (old?) table or database name '#sql-1bc30_11fce1'