[MDEV-14378] In ALGORITHM=INPLACE, use a common name for the intermediate tables or partitions Created: 2017-11-13  Updated: 2018-09-26  Resolved: 2017-11-13

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Fix Version/s: 10.3.3, 10.2.19

Type: Task Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: alter

Issue Links:
Relates
relates to MDEV-13407 innodb.drop_table_background failed i... Closed

 Description   

DDL operations in MariaDB are known to not be crash-safe. The most unsafe is ALGORITHM=INPLACE, because the .frm file is replaced out of sync with the InnoDB transaction commit.

One thing that can be improved is that when the server is killed before the InnoDB transaction commit becomes durable, the intermediate table should be removable by executing a statement like

DROP TABLE `#mysql50##sql-abcd_1.frm`;

Currently, the intermediate table in the InnoDB internal data dictionary is not derived from the .frm file name, and such a DROP TABLE statement would leave orphan entries in the InnoDB internal data dictionary.



 Comments   
Comment by Michael Widenius [ 2017-11-17 ]

I have added that in MariaDB 10.3, one can drop an orphaned #sql- table name with DROP TABLE #sql-...

This is a temporary fix until we make table name creation in ALTER TABLE crash proof
(10.3 or 10.4)

Generated at Thu Feb 08 08:13:05 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.