Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
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.:
[ec2-user@ip-172-30-0-249 ~]$ cd /tmp
|
[ec2-user@ip-172-30-0-249 tmp]$ sudo mysqlfrm --server=root:@localhost:3306 /var/lib/mysql/db1/tab.frm --port=12345 --user=mysql
|
# Source on localhost: ... connected.
|
# Spawning server with --user=mysql.
|
# Starting the spawned server on port 12345 ... done.
|
# Reading .frm files
|
#
|
# Reading the tab.frm file.
|
#
|
# CREATE statement for /var/lib/mysql/db1/tab.frm:
|
#
|
|
CREATE TABLE `db1`.`tab` (
|
`id` int(11) NOT NULL,
|
`str` varchar(50) DEFAULT NULL,
|
PRIMARY KEY (`id`)
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
|
#...done.
|
Attachments
Issue Links
- relates to
-
MDEV-15225 Can't import .ibd file with temporal type format differing from mysql56_temporal_format
-
- Closed
-
-
MDEV-26577 InnoDB: Failing assertion: dict_tf2_is_valid(flags, flags2) during ADD COLUMN
-
- Closed
-
-
MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade
-
- Closed
-
-
MDEV-4637 TOOLS - FRM file parser / file information
-
- Open
-
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???