Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
N/A
-
None
Description
If table creation fails due to an atomic_write-related problem, the failed CREATE statement leaves an orphan .ibd file behind, which is not easy to get rid of, apart from removing it from the file system:
MariaDB [test]> create table t1 (i int) engine=InnoDB atomic_writes=off; |
ERROR 1005 (HY000): Can't create table `test`.`t1` (errno: -1 "Internal error < 0 (Not system error)") |
MariaDB [test]> system ls -l data/test/
|
-rw-rw---- 1 elenst elenst 0 Apr 11 01:48 t1.ibd
|
MariaDB [test]> show tables;
|
Empty set (0.00 sec)
|
|
MariaDB [test]> create table t1 (i int);
|
ERROR 1813 (HY000): Tablespace for table '`test`.`t1`' exists. Please DISCARD the tablespace before IMPORT. |
MariaDB [test]> alter table t1 discard tablespace;
|
ERROR 1146 (42S02): Table 'test.t1' doesn't exist |