My Oracle Support Banner

Remove a Table With Missing Partition Tablespaces (Doc ID 2197361.1)

Last updated on AUGUST 17, 2021

Applies to:

MySQL Server - Version 5.5 and later
Information in this document applies to any platform.
It is possible by removing partition tablespaces or .frm or .par files to get in a situation in which a table can neither be used nor dropped because the data dictionary is out of sync with the reality of the data files.


Tables are defined in two places:

  1. One is the .frm file
  2. The other is in the internal data dictionary

When the internal data dictionary doesn't match the .frm file, MySQL has a problem figuring out whether the table actually exists or not and it's possible to create a situation in which the table can't be created because it already exists and it can't be dropped because it doesn't exist.

Creating just the .frm (and the .par for a partitioned file) will cause the server to throw an error message about missing tablespaces, but it should still start normally and allow the table to be dropped even though the tablespace(s) are not there.

The goal is to drop a partitioned table when some of the partition tablespaces, .frm, or .par are missing.

Note that this process can not be used to salvage data from remaining partitions. All data from the table will be lost.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.