Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
None
Description
Right now the best way I could come up with to check whether there might be a DISCARDed table/tablespace on a MariaDB server instance is building upon the fact that discarded tablespaces do not show up in INNODB_SYS_TABLESPACES:
SELECT T.TABLE_SCHEMA, T.TABLE_NAME
|
FROM INFORMATION_SCHEMA.TABLES T
|
LEFT OUTER JOIN INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES I
|
ON CONCAT(T.TABLE_SCHEMA,'/',T.TABLE_NAME) = I.NAME
|
WHERE T.ENGINE='InnoDB'
|
AND T.CREATE_OPTIONS NOT LIKE '%partitioned%'
|
AND I.FILENAME IS NULL;
|
This obviously does not work for discarded partitions, and may also otherwise generate false positives.
A more direct and more reliable method to check for tables with discarded tablespaces would be appreciated.
Attachments
Issue Links
- is duplicated by
-
MDEV-30615 Can't read from I_S.INNODB_SYS_INDEXES when having a discarded tablesace
- Closed
- relates to
-
MDEV-30615 Can't read from I_S.INNODB_SYS_INDEXES when having a discarded tablesace
- Closed