[MDEV-18827] Create utility to parse frm files and print their DDL (Full-time project - potential part-time) Created: 2019-03-06 Updated: 2023-11-08 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Create Table, Scripts & Clients |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Unresolved | Votes: | 5 |
| Labels: | beginner-friendly, gsoc21, gsoc22 | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
It would be useful if MariaDB had a utility that was able to parse frm files and print the DDL associated with the table. For example, it would be useful for users who performed a partial backup with Mariabackup: https://mariadb.com/kb/en/library/partial-backup-and-restore-with-mariabackup/ But they forgot to also backup the table DDL, so they can't restore the tables using the following process: mysqlfrm is a tool that already exists that does similar things: https://github.com/mysql/mysql-utilities/blob/master/scripts/mysqlfrm.py But it doesn't seem very user-friendly. It needs to be able to contact the local MariaDB server, and it also needs to be able to spawn a server instance, and it seems to need to be able to create a bunch of files during this process. e.g.:
|
| Comments |
| Comment by Oli Sennhauser [ 2021-03-26 ] |
|
This would be a huge benefit for mariabackup partial table or schema restore. this tool could help to automatize and thus simplify partial table or schema restore with mariabackup!!! which is still quite complicated for normal admins. Ideally Vladislav Vaintroub and/or Vladislav Lesin should look into this??? |
| Comment by Marko Mäkelä [ 2022-06-28 ] |
|
The actual ROW_FORMAT used by InnoDB can differ from what is specified in the .frm file. See Sometimes, there are many .frm file encodings that lead to the same SHOW CREATE TABLE output, even though internally there is some significant change. Examples include For partial restore of backups, I think that the correct solution would be to implement .frm file based IMPORT (MDEV-11658). |
| Comment by Antonio Bardazzi [ 2023-01-26 ] |
|
As a partial workaround there is frmdump utility by DBSake:
|
| Comment by Marko Mäkelä [ 2023-11-08 ] |
|
ALTER TABLE…IMPORT TABLESPACE based on the contents of the original .frm file was actually implemented in |