Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

Diffrent results recreating .frm files with mysqlfrm between MySQL 5.7 and Percona XtraDB cluster 5.7 #54

Open
The-Comunista opened this issue Nov 22, 2022 · 0 comments

Comments

@The-Comunista
Copy link

The-Comunista commented Nov 22, 2022

I have recently stumbled upon a problem while restoring a MySQL 5.7 database into a Percona XtraDB cluster 5.7.

These are the version of the tools I am using:

[root@percona-1 ~]# rpm -q mysql-utilities
mysql-utilities-1.6.5-1.el7.noarch
[root@percona-1 ~]# rpm -q mysql-connector-python
mysql-connector-python-2.0.4-1.el7.noarch
[root@percona-1 ~]# mysqlfrm --version
MySQL Utilities mysqlfrm version 1.6.5

seems as if mysqlfrm can't open files for reading on percona xtradb cluster 5.7 as opposed to a normal MySQL 5.7 database.

Exapmple done on percona xtradb cluster 5.7:

mysqlfrm -vvv --user=root '--server=root:password@localhost:3306' --port=3310 /root/database/example.frm

# Reading .frm files
#
# Reading the example.frm file.
# Changing engine for .frm file /tmp/tmp_Rh5I8/database_temp/example.frm:
# Skipping to header at : 2
# General Data from .frm file:
{'IO_SIZE': 4096,
 'MYSQL_VERSION_ID': 50723,
 'avg_row_length': 0,
 'charset_low': 0,
 'create_options': 9,
 'db_create_pack': 2,
 'default_charset': 45,
 'default_part_eng': 0,
 'extra_size': 36,
 'frm_file_ver': 5,
 'frm_version': 10,
 'key_block_size': 0,
 'key_info_length': 88,
 'key_length': 706,
 'legacy_db_type': 'INNODB',
 'length': 12288,
 'max_rows': 0,
 'min_rows': 0,
 'rec_length': 436,
 'row_type': 0,
 'table_charset': 45,
 'tmp_key_length': 706}
# Engine string: InnoDB
# Server version in file: 5.7.23
ERROR: Failed to correctly read the .frm file. Please try reading the file with the --diagnostic mode.
# Shutting down spawned server
# Removing the temporary datadir
#
# WARNING: The following files could not be read. You can try the --diagnostic mode to read these files.
#
# /root/database/example.frm
#
#...done.

Exapmple done on mysql 5.7:

mysqlfrm -vvv --user=root '--server=root:password@localhost:3306' --port=3310 /root/database/example.frm

# Reading .frm files
#
# Reading the example.frm file.
# Changing engine for .frm file /tmp/tmpVg9PpA/database_temp/example.frm:
# Skipping to header at : 2
# General Data from .frm file:
{'IO_SIZE': 4096,
 'MYSQL_VERSION_ID': 50723,
 'avg_row_length': 0,
 'charset_low': 0,
 'create_options': 9,
 'db_create_pack': 2,
 'default_charset': 45,
 'default_part_eng': 0,
 'extra_size': 36,
 'frm_file_ver': 5,
 'frm_version': 10,
 'key_block_size': 0,
 'key_info_length': 88,
 'key_length': 706,
 'legacy_db_type': 'INNODB',
 'length': 12288,
 'max_rows': 0,
 'min_rows': 0,
 'rec_length': 436,
 'row_type': 0,
 'table_charset': 45,
 'tmp_key_length': 706}
# Engine string: InnoDB
# Server version in file: 5.7.23
#
# CREATE statement for /root/database/example.frm:
#
CREATE TABLE `database`.`example` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(100) NOT NULL DEFAULT '',
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `reserved_at` int(10) unsigned DEFAULT '0',
  `available_at` int(10) unsigned NOT NULL DEFAULT '0',
  `created_at` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `jobs_queue_reserved_at_index` (`queue`,`reserved_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
# Shutting down spawned server
# Removing the temporary datadir
#...done.

Looking forward for an explanation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant