For what it's worth, I reproduced (with PS 5.6.27) using MTR queries
...snip... msandbox@localhost (empty) > SHOW TABLES; +------------------------------------------------------------------+ | Tables_in_empty | +------------------------------------------------------------------+ | XK4P3A_B0ZCUC_4WXPFR_MIDTE7_BOA174_IQJFXC_2AE81C_HP6FVD_1OLDJ0_K | | _product_instance_new | | customer_profile | | organisation | | product_specification | +------------------------------------------------------------------+ 5 rows in set (0.00 sec)
msandbox@localhost (empty) > SYSTEM ls -lha data/empty/; total 828K drwx------ 2 marcos.albe percona 4.0K Jul 20 18:54 . drwx------ 8 marcos.albe percona 4.0K Jul 20 18:54 .. -rw-rw---- 1 marcos.albe percona 9.9K Jul 20 18:54 customer_profile.frm -rw-rw---- 1 marcos.albe percona 176K Jul 20 18:54 customer_profile.ibd -rw-rw---- 1 marcos.albe percona 61 Jul 20 18:54 db.opt -rw-rw---- 1 marcos.albe percona 9.3K Jul 20 18:54 organisation.frm -rw-rw---- 1 marcos.albe percona 112K Jul 20 18:54 organisation.ibd -rw-rw---- 1 marcos.albe percona 9.4K Jul 20 18:54 _product_instance_new.frm -rw-rw---- 1 marcos.albe percona 192K Jul 20 18:54 _product_instance_new.ibd -rw-rw---- 1 marcos.albe percona 13K Jul 20 18:54 product_specification.frm -rw-rw---- 1 marcos.albe percona 96K Jul 20 18:54 product_specification.ibd -rw-rw---- 1 marcos.albe percona 9.3K Jul 20 18:54 XK4P3A_B0ZCUC_4WXPFR_MIDTE7_BOA174_IQJFXC_2AE81C_HP6FVD_1OLDJ0_K.frm -rw-rw---- 1 marcos.albe percona 176K Jul 20 18:54 XK4P3A_B0ZCUC_4WXPFR_MIDTE7_BOA174_IQJFXC_2AE81C_HP6FVD_1OLDJ0_K.ibd RDS: msandbox@localhost (empty) > SELECT * FROM information_schema.innodb_sys_tables WHERE name LIKE '%product_instance%' OR name LIKE '%XK4P3A%'; +----------+------------------------------------------------------------------------+------+--------+-------+-------------+------------+---------------+ | TABLE_ID | NAME | FLAG | N_COLS | SPACE | FILE_FORMAT | ROW_FORMAT | ZIP_PAGE_SIZE | +----------+------------------------------------------------------------------------+------+--------+-------+-------------+------------+---------------+ | 228 | empty/XK4P3A_B0ZCUC_4WXPFR_MIDTE7_BOA174_IQJFXC_2AE81C_HP6FVD_1OLDJ0_K | 1 | 20 | 200 | Antelope | Compact | 0 | | 225 | empty/_product_instance_new | 1 | 21 | 197 | Antelope | Compact | 0 | | 200 | test/_product_instance_new | 1 | 21 | 172 | Antelope | Compact | 0 | +----------+------------------------------------------------------------------------+------+--------+-------+-------------+------------+---------------+ 3 rows in set (0.00 sec)
RDS: msandbox@localhost (empty) > RENAME TABLE `_product_instance_new` TO `product_instance`; ERROR 1050 (42S01): Table './empty/product_instance' already exists Error (Code 1050): Table './empty/product_instance' already exists Error (Code 1025): Error on rename of './empty/_product_instance_new' to './empty/product_instance' (errno: -1 - Unknown error -1)
For what it's worth, I reproduced (with PS 5.6.27) using MTR queries
...snip... ------- ------- ------- ------- ------- ------- ------- ------- ----+ ------- ------- ------- ------- ------- ------- ------- ------- ----+ B0ZCUC_ 4WXPFR_ MIDTE7_ BOA174_ IQJFXC_ 2AE81C_ HP6FVD_ 1OLDJ0_ K | instance_ new | specification | ------- ------- ------- ------- ------- ------- ------- ------- ----+
msandbox@localhost (empty) > SHOW TABLES;
+------
| Tables_in_empty |
+------
| XK4P3A_
| _product_
| customer_profile |
| organisation |
| product_
+------
5 rows in set (0.00 sec)
msandbox@localhost (empty) > SYSTEM ls -lha data/empty/; profile. frm profile. ibd instance_ new.frm instance_ new.ibd specification. frm specification. ibd B0ZCUC_ 4WXPFR_ MIDTE7_ BOA174_ IQJFXC_ 2AE81C_ HP6FVD_ 1OLDJ0_ K.frm B0ZCUC_ 4WXPFR_ MIDTE7_ BOA174_ IQJFXC_ 2AE81C_ HP6FVD_ 1OLDJ0_ K.ibd schema. innodb_ sys_tables WHERE name LIKE '%product_ instance% ' OR name LIKE '%XK4P3A%'; ----+-- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- +------ +------ --+---- ---+--- ------- ---+--- ------- --+---- ------- ----+ ----+-- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- +------ +------ --+---- ---+--- ------- ---+--- ------- --+---- ------- ----+ B0ZCUC_ 4WXPFR_ MIDTE7_ BOA174_ IQJFXC_ 2AE81C_ HP6FVD_ 1OLDJ0_ K | 1 | 20 | 200 | Antelope | Compact | 0 | product_ instance_ new | 1 | 21 | 197 | Antelope | Compact | 0 | instance_ new | 1 | 21 | 172 | Antelope | Compact | 0 | ----+-- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- +------ +------ --+---- ---+--- ------- ---+--- ------- --+---- ------- ----+
total 828K
drwx------ 2 marcos.albe percona 4.0K Jul 20 18:54 .
drwx------ 8 marcos.albe percona 4.0K Jul 20 18:54 ..
-rw-rw---- 1 marcos.albe percona 9.9K Jul 20 18:54 customer_
-rw-rw---- 1 marcos.albe percona 176K Jul 20 18:54 customer_
-rw-rw---- 1 marcos.albe percona 61 Jul 20 18:54 db.opt
-rw-rw---- 1 marcos.albe percona 9.3K Jul 20 18:54 organisation.frm
-rw-rw---- 1 marcos.albe percona 112K Jul 20 18:54 organisation.ibd
-rw-rw---- 1 marcos.albe percona 9.4K Jul 20 18:54 _product_
-rw-rw---- 1 marcos.albe percona 192K Jul 20 18:54 _product_
-rw-rw---- 1 marcos.albe percona 13K Jul 20 18:54 product_
-rw-rw---- 1 marcos.albe percona 96K Jul 20 18:54 product_
-rw-rw---- 1 marcos.albe percona 9.3K Jul 20 18:54 XK4P3A_
-rw-rw---- 1 marcos.albe percona 176K Jul 20 18:54 XK4P3A_
RDS: msandbox@localhost (empty) > SELECT * FROM information_
+------
| TABLE_ID | NAME | FLAG | N_COLS | SPACE | FILE_FORMAT | ROW_FORMAT | ZIP_PAGE_SIZE |
+------
| 228 | empty/XK4P3A_
| 225 | empty/_
| 200 | test/_product_
+------
3 rows in set (0.00 sec)
RDS: msandbox@localhost (empty) > RENAME TABLE `_product_ instance_ new` TO `product_instance`; product_ instance' already exists product_ instance' already exists _product_ instance_ new' to './empty/ product_ instance' (errno: -1 - Unknown error -1)
ERROR 1050 (42S01): Table './empty/
Error (Code 1050): Table './empty/
Error (Code 1025): Error on rename of './empty/