Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
When we try to restore a sequence table (*.ibd, *.cfg) with TTS (TABLESPACE DISCARD/TABLESPACE IMPORT) we are getting the following error:
ALTER TABLE `test`.`s1` DISCARD TABLESPACE
ERROR: Invalid query: ALTER TABLE `test`.`s1` DISCARD TABLESPACE, Storage engine SEQUENCE of the table `test`.`s1` doesn't have this option (rc=4796)
Scenario: We try to automatize a partial (= schema/database) physical restore done with mariadb-backup and we try to do that pretty reliable and agnostic. And during the restore we either do NOT have a running database or we have to assume that the database is not created yet (because we want to restore it right now...)
So it is quite hard for a tool to guess if a "table" is a real innodb table or a sequence:
$ ll s1*
rw-rw--- 1 mysql mysql 873 May 28 14:03 s1.cfg
rw-rw--- 1 mysql mysql 919 May 27 16:02 s1.frm
rw-rw--- 1 mysql mysql 65536 May 27 16:02 s1.ibd
OK. We can parse the .frm file and look for tags like 'cache_size' or 'start_value' but this is pretty unreliable. And we still lack an official .frm parser utilty which would make the task of partial restore much more convenient...